mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-09 02:24:03 +01:00
Refactor to work as intended
This commit is contained in:
parent
1d9ee917c5
commit
7e55896e2a
1 changed files with 11 additions and 10 deletions
21
oh-my-zsh.sh
21
oh-my-zsh.sh
|
|
@ -9,16 +9,6 @@ fi
|
||||||
# add a function path
|
# add a function path
|
||||||
fpath=($ZSH/functions $ZSH/completions $fpath)
|
fpath=($ZSH/functions $ZSH/completions $fpath)
|
||||||
|
|
||||||
# Load all library config files in the lib/ folder. If a config file with the
|
|
||||||
# same name exists under custom/ load that instead. This allows you to override
|
|
||||||
# default behaviors
|
|
||||||
for library ($ZSH/lib/*.zsh); do
|
|
||||||
if [ -f $ZSH/custom/$library:t ]; then
|
|
||||||
source $ZSH/custom/$library:t
|
|
||||||
elif [ -f $library ]; then
|
|
||||||
source $library
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Set ZSH_CUSTOM to the path where your custom config files
|
# Set ZSH_CUSTOM to the path where your custom config files
|
||||||
# and plugins exists, or else we will use the default custom/
|
# and plugins exists, or else we will use the default custom/
|
||||||
|
|
@ -26,6 +16,17 @@ if [[ -z "$ZSH_CUSTOM" ]]; then
|
||||||
ZSH_CUSTOM="$ZSH/custom"
|
ZSH_CUSTOM="$ZSH/custom"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Load all library config files in the lib/ folder. If a config file with the
|
||||||
|
# same name exists under custom/ don't load the one in lib/. This allows you to
|
||||||
|
# override default behaviors
|
||||||
|
for library ($ZSH/lib/*.zsh); do
|
||||||
|
if [ ! -f $ZSH_CUSTOM/$library:t ]; then
|
||||||
|
source $library
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Load all of your custom configurations from custom/
|
||||||
|
for config_file ($ZSH_CUSTOM/*.zsh(N)) source $config_file
|
||||||
|
|
||||||
is_plugin() {
|
is_plugin() {
|
||||||
local base_dir=$1
|
local base_dir=$1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue