4b4cc9a4a57468218b25b10c21c1e6060f42544b
- Author
- Marc Cornellà <hello@mcornella.com>
- Committer
- Marc Cornellà <hello@mcornella.com>
- Date
Message
fix(cli): fix plugin and theme suggestions in completion for older zsh versions
Diff
1diff --git a/lib/cli.zsh b/lib/cli.zsh
2index aed84e08f76f12cd6e39f51636feeaf13966f618..4917bc354cc0e8b748b6074c385d89a317012727 100644
3--- a/lib/cli.zsh
4+++ b/lib/cli.zsh
5@@ -68,10 +68,12 @@ function _omz {
6
7 _describe 'plugin' valid_plugins ;;
8 plugin::info)
9- local -aU plugins=("$ZSH"/plugins/*/{_*,*.plugin.zsh}(.N:h:t) "$ZSH_CUSTOM"/plugins/*/{_*,*.plugin.zsh}(.N:h:t))
10+ local -aU plugins
11+ plugins=("$ZSH"/plugins/*/{_*,*.plugin.zsh}(.N:h:t) "$ZSH_CUSTOM"/plugins/*/{_*,*.plugin.zsh}(.N:h:t))
12 _describe 'plugin' plugins ;;
13 theme::(set|use))
14- local -aU themes=("$ZSH"/themes/*.zsh-theme(.N:t:r) "$ZSH_CUSTOM"/**/*.zsh-theme(.N:r:gs:"$ZSH_CUSTOM"/themes/:::gs:"$ZSH_CUSTOM"/:::))
15+ local -aU themes
16+ themes=("$ZSH"/themes/*.zsh-theme(.N:t:r) "$ZSH_CUSTOM"/**/*.zsh-theme(.N:r:gs:"$ZSH_CUSTOM"/themes/:::gs:"$ZSH_CUSTOM"/:::))
17 _describe 'theme' themes ;;
18 esac
19 elif (( CURRENT > 4 )); then