mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
made some things more slimmer, and faster
This commit is contained in:
parent
c15ce20b30
commit
abb32b0209
1 changed files with 14 additions and 10 deletions
24
omz
24
omz
|
|
@ -25,21 +25,25 @@ omz() {
|
||||||
source $config_file
|
source $config_file
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# for plugin ($plugins)
|
||||||
|
# fpath=($ZSH/plugins/$plugin $fpath)
|
||||||
|
|
||||||
|
# if [[ -d $OMZ ]]; then
|
||||||
|
# if [[ -d $OMZ/plugins ]]; then
|
||||||
|
# for plugin ($plugins)
|
||||||
|
# fpath=($OMZ/plugins/$plugin $fpath)
|
||||||
|
# fi
|
||||||
|
# fi
|
||||||
|
|
||||||
for plugin ($plugins)
|
for plugin ($plugins)
|
||||||
fpath=($ZSH/plugins/$plugin $fpath)
|
[[ -d $OMZ/plugins/$plugin ]] && fpath=($OMZ/plugins/$plugin $fpath) && continue || \
|
||||||
|
[[ -d $ZSH/plugins/$plugin ]] && fpath=($ZSH/plugins/$plugin $fpath) || omz_log_msg "$plugin not found."
|
||||||
|
|
||||||
if [[ -d $OMZ ]]; then
|
# Load and run compinit
|
||||||
if [[ -d $OMZ/plugins ]]; then
|
|
||||||
for plugin ($plugins)
|
|
||||||
fpath=($OMZ/plugins/$plugin $fpath)
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Load and run compinit
|
|
||||||
autoload -U compinit
|
autoload -U compinit
|
||||||
compinit -i
|
compinit -i
|
||||||
|
|
||||||
# load plugins
|
# load plugins (TODO: Make this slimmer and better)
|
||||||
for plugin ($plugins); do
|
for plugin ($plugins); do
|
||||||
plugin_sub=$(echo $plugin|cut -d'/' -f2)
|
plugin_sub=$(echo $plugin|cut -d'/' -f2)
|
||||||
if [[ -f $OMZ/plugins/$plugin/$plugin_sub.plugin.zsh ]]; then
|
if [[ -f $OMZ/plugins/$plugin/$plugin_sub.plugin.zsh ]]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue