mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
Fixed some things in the last commit; and also made it possible to run sections of the omz init after the initial init. eg, omz plugins; omz theme my-custom-theme
This commit is contained in:
parent
d872d12e76
commit
e84536c6aa
1 changed files with 7 additions and 3 deletions
10
omz
10
omz
|
|
@ -25,16 +25,20 @@ omz() {
|
||||||
# load lib
|
# load lib
|
||||||
for config_file ({$ZSH/lib,$OMZ}/*.zsh(N))
|
for config_file ({$ZSH/lib,$OMZ}/*.zsh(N))
|
||||||
source $config_file
|
source $config_file
|
||||||
|
omz plugin
|
||||||
|
omz theme
|
||||||
|
;;
|
||||||
|
"plugin")
|
||||||
# load plugins
|
# load plugins
|
||||||
for plugin ($plugins); do
|
for plugin ($plugins); do
|
||||||
files=({$OMZ,$ZSH}/plugins/$plugin/$(basename $plugin).plugin.zsh(N))
|
files=({$OMZ,$ZSH}/plugins/$plugin/$(basename $plugin).plugin.zsh(N))
|
||||||
source $files[1] || omz_log_msg "$plugin not found."
|
source $files[1] || omz_log_msg "$plugin not found."
|
||||||
done
|
done
|
||||||
|
;;
|
||||||
|
"theme")
|
||||||
local theme
|
local theme
|
||||||
zstyle -a :omz:style theme theme
|
zstyle -a :omz:style theme theme
|
||||||
set_theme $theme
|
set_theme ${2:-$theme}
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "$0: invalid command $1" 2>&1
|
echo "$0: invalid command $1" 2>&1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue