mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-19 20:29:45 +01:00
fix(cli): follow symlinks in plugin or theme completions
This commit is contained in:
parent
c6e7f8905f
commit
a92ee838f3
1 changed files with 4 additions and 4 deletions
|
@ -61,7 +61,7 @@ function _omz {
|
||||||
# if command is "disable", only offer already enabled plugins
|
# if command is "disable", only offer already enabled plugins
|
||||||
valid_plugins=($plugins)
|
valid_plugins=($plugins)
|
||||||
else
|
else
|
||||||
valid_plugins=("$ZSH"/plugins/*/{_*,*.plugin.zsh}(.N:h:t) "$ZSH_CUSTOM"/plugins/*/{_*,*.plugin.zsh}(.N:h:t))
|
valid_plugins=("$ZSH"/plugins/*/{_*,*.plugin.zsh}(-.N:h:t) "$ZSH_CUSTOM"/plugins/*/{_*,*.plugin.zsh}(-.N:h:t))
|
||||||
# if command is "enable", remove already enabled plugins
|
# if command is "enable", remove already enabled plugins
|
||||||
[[ "${words[3]}" = enable ]] && valid_plugins=(${valid_plugins:|plugins})
|
[[ "${words[3]}" = enable ]] && valid_plugins=(${valid_plugins:|plugins})
|
||||||
fi
|
fi
|
||||||
|
@ -69,11 +69,11 @@ function _omz {
|
||||||
_describe 'plugin' valid_plugins ;;
|
_describe 'plugin' valid_plugins ;;
|
||||||
plugin::info)
|
plugin::info)
|
||||||
local -aU plugins
|
local -aU plugins
|
||||||
plugins=("$ZSH"/plugins/*/{_*,*.plugin.zsh}(.N:h:t) "$ZSH_CUSTOM"/plugins/*/{_*,*.plugin.zsh}(.N:h:t))
|
plugins=("$ZSH"/plugins/*/{_*,*.plugin.zsh}(-.N:h:t) "$ZSH_CUSTOM"/plugins/*/{_*,*.plugin.zsh}(-.N:h:t))
|
||||||
_describe 'plugin' plugins ;;
|
_describe 'plugin' plugins ;;
|
||||||
theme::(set|use))
|
theme::(set|use))
|
||||||
local -aU themes
|
local -aU themes
|
||||||
themes=("$ZSH"/themes/*.zsh-theme(.N:t:r) "$ZSH_CUSTOM"/**/*.zsh-theme(.N:r:gs:"$ZSH_CUSTOM"/themes/:::gs:"$ZSH_CUSTOM"/:::))
|
themes=("$ZSH"/themes/*.zsh-theme(-.N:t:r) "$ZSH_CUSTOM"/**/*.zsh-theme(-.N:r:gs:"$ZSH_CUSTOM"/themes/:::gs:"$ZSH_CUSTOM"/:::))
|
||||||
_describe 'theme' themes ;;
|
_describe 'theme' themes ;;
|
||||||
esac
|
esac
|
||||||
elif (( CURRENT > 4 )); then
|
elif (( CURRENT > 4 )); then
|
||||||
|
@ -85,7 +85,7 @@ function _omz {
|
||||||
# if command is "disable", only offer already enabled plugins
|
# if command is "disable", only offer already enabled plugins
|
||||||
valid_plugins=($plugins)
|
valid_plugins=($plugins)
|
||||||
else
|
else
|
||||||
valid_plugins=("$ZSH"/plugins/*/{_*,*.plugin.zsh}(.N:h:t) "$ZSH_CUSTOM"/plugins/*/{_*,*.plugin.zsh}(.N:h:t))
|
valid_plugins=("$ZSH"/plugins/*/{_*,*.plugin.zsh}(-.N:h:t) "$ZSH_CUSTOM"/plugins/*/{_*,*.plugin.zsh}(-.N:h:t))
|
||||||
# if command is "enable", remove already enabled plugins
|
# if command is "enable", remove already enabled plugins
|
||||||
[[ "${words[3]}" = enable ]] && valid_plugins=(${valid_plugins:|plugins})
|
[[ "${words[3]}" = enable ]] && valid_plugins=(${valid_plugins:|plugins})
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue