mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
Source .zsh files ~/.omz instead of ~/.omz/lib for user customizations. Use NULL_GLOB when sourcing files in directory to properly deal with no matches.
This commit is contained in:
parent
378ef22fb7
commit
6b8046d0af
1 changed files with 11 additions and 7 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
ZSH=${ZSH:-/usr/share/oh-my-zsh/}
|
ZSH=${ZSH:-/usr/share/oh-my-zsh/}
|
||||||
|
|
||||||
local config_file plugin
|
local config_file plugin
|
||||||
|
plugin=${plugin:=()}
|
||||||
|
|
||||||
# add a function path
|
# add a function path
|
||||||
fpath=($ZSH/functions $ZSH/completions $fpath)
|
fpath=($ZSH/functions $ZSH/completions $fpath)
|
||||||
|
|
@ -11,18 +12,21 @@ if [[ -d ~/.omz ]]; then
|
||||||
[[ -d ~/.omz/completion ]] && fpath=(~/.omz/completions $fpath)
|
[[ -d ~/.omz/completion ]] && fpath=(~/.omz/completions $fpath)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for config_file ($ZSH/lib/*.zsh) source $config_file
|
for config_file ($ZSH/lib/*.zsh(N))
|
||||||
|
source $config_file
|
||||||
|
|
||||||
if [[ -d ~/.omz ]]; then
|
if [[ -d ~/.omz ]]; then
|
||||||
if [[ -d ~/.omz/lib ]]; then
|
for config_file (~/.omz/*.zsh(N))
|
||||||
for config_file (~/.omz/lib/*.zsh) source $config_file
|
source $config_file
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
plugin=${plugin:=()}
|
for plugin ($plugins)
|
||||||
for plugin ($plugins) fpath=($ZSH/plugins/$plugin $fpath)
|
fpath=($ZSH/plugins/$plugin $fpath)
|
||||||
|
|
||||||
if [[ -d ~/.omz ]]; then
|
if [[ -d ~/.omz ]]; then
|
||||||
if [[ -d ~/.omz/plugins ]]; then
|
if [[ -d ~/.omz/plugins ]]; then
|
||||||
for plugin ($plugins) fpath=(~/.omz/plugins/$plugin $fpath)
|
for plugin ($plugins)
|
||||||
|
fpath=(~/.omz/plugins/$plugin $fpath)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue