fix(cli): fix plugin and theme suggestions in completion for older zsh versions

parent 7d03ea18
...@@ -68,10 +68,12 @@ function _omz { ...@@ -68,10 +68,12 @@ function _omz {
_describe 'plugin' valid_plugins ;; _describe 'plugin' valid_plugins ;;
plugin::info) plugin::info)
local -aU plugins=("$ZSH"/plugins/*/{_*,*.plugin.zsh}(.N:h:t) "$ZSH_CUSTOM"/plugins/*/{_*,*.plugin.zsh}(.N:h:t)) local -aU plugins
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=("$ZSH"/themes/*.zsh-theme(.N:t:r) "$ZSH_CUSTOM"/**/*.zsh-theme(.N:r:gs:"$ZSH_CUSTOM"/themes/:::gs:"$ZSH_CUSTOM"/:::)) local -aU themes
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment