mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
tiny updates
This commit is contained in:
parent
2b2bc3c778
commit
50a2b965db
2 changed files with 12 additions and 9 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
# Initializes Oh My Zsh
|
# Initializes Oh My Zsh
|
||||||
ZSH=${ZSH:-/usr/share/oh-my-zsh/}
|
ZSH=${ZSH:-/usr/share/oh-my-zsh}
|
||||||
|
ZSH2=$HOME/.zsh
|
||||||
|
|
||||||
local config_file plugin
|
local config_file plugin
|
||||||
plugin=${plugin:=()}
|
plugin=${plugin:=()}
|
||||||
|
|
@ -7,16 +8,16 @@ plugin=${plugin:=()}
|
||||||
# add a function path
|
# add a function path
|
||||||
fpath=($ZSH/functions $ZSH/completions $fpath)
|
fpath=($ZSH/functions $ZSH/completions $fpath)
|
||||||
|
|
||||||
if [[ -d ~/.omz ]]; then
|
if [[ -d $OMZ2 ]]; then
|
||||||
[[ -d ~/.omz/functions ]] && fpath=(~/.omz/functions $fpath)
|
[[ -d $OMZ2/functions ]] && fpath=($OMZ2/functions $fpath)
|
||||||
[[ -d ~/.omz/completion ]] && fpath=(~/.omz/completions $fpath)
|
[[ -d $OMZ2/completion ]] && fpath=($OMZ2/completions $fpath)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for config_file ($ZSH/lib/*.zsh(N))
|
for config_file ($ZSH/lib/*.zsh(N))
|
||||||
source $config_file
|
source $config_file
|
||||||
|
|
||||||
if [[ -d ~/.omz ]]; then
|
if [[ -d ~/.omz ]]; then
|
||||||
for config_file (~/.omz/*.zsh(N))
|
for config_file ($OMG2/*.zsh(N))
|
||||||
source $config_file
|
source $config_file
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -24,9 +25,9 @@ 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 $OMZ2/plugins ]]; then
|
||||||
for plugin ($plugins)
|
for plugin ($plugins)
|
||||||
fpath=(~/.omz/plugins/$plugin $fpath)
|
fpath=($OMZ2/plugins/$plugin $fpath)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -36,8 +37,8 @@ compinit -i
|
||||||
|
|
||||||
# load plugins
|
# load plugins
|
||||||
for plugin ($plugins); do
|
for plugin ($plugins); do
|
||||||
if [[ -f ~/.omz/plugins/$plugin/$plugin.plugin.zsh ]]; then
|
if [[ -f $OMZ2/plugins/$plugin/$plugin.plugin.zsh ]]; then
|
||||||
source ~/.omz/plugins/$plugin/$plugin.plugin.zsh
|
source $OMZ2/plugins/$plugin/$plugin.plugin.zsh
|
||||||
elif [[ -f $ZSH/plugins/$plugin/$plugin.plugin.zsh ]]; then
|
elif [[ -f $ZSH/plugins/$plugin/$plugin.plugin.zsh ]]; then
|
||||||
source $ZSH/plugins/$plugin/$plugin.plugin.zsh
|
source $ZSH/plugins/$plugin/$plugin.plugin.zsh
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
ZSH=/usr/share/oh-my-zsh
|
ZSH=/usr/share/oh-my-zsh
|
||||||
|
|
||||||
|
zstyle :omz:plugins:sprunge add-path on
|
||||||
ZSH_THEME="arch-blue"
|
ZSH_THEME="arch-blue"
|
||||||
|
plugins=(archlinux sprunge)
|
||||||
|
|
||||||
omz_init(){
|
omz_init(){
|
||||||
source $ZSH/oh-my-zsh.zsh
|
source $ZSH/oh-my-zsh.zsh
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue