mirror of
https://github.com/conda-incubator/conda-zsh-completion.git
synced 2026-10-20 04:25:20 +08:00
localize some more variables
This commit is contained in:
@@ -138,6 +138,8 @@ __conda_channels(){
|
|||||||
_describe -t channels 'conda channels' channels
|
_describe -t channels 'conda channels' channels
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local -a __conda_boolean_config_keys __conda_list_config_keys __conda_config_keys
|
||||||
|
|
||||||
__conda_boolean_config_keys=(
|
__conda_boolean_config_keys=(
|
||||||
'add_binstar_token'
|
'add_binstar_token'
|
||||||
'always_yes'
|
'always_yes'
|
||||||
@@ -217,16 +219,12 @@ _conda_caching_policy() {
|
|||||||
(( $#oldp ))
|
(( $#oldp ))
|
||||||
}
|
}
|
||||||
|
|
||||||
local -a opts
|
local -a opts help_opts json_opts env_opts channel_opts install_opts
|
||||||
opts=(
|
opts=(
|
||||||
'(-h --help)'{-h,--help}'[show this help message and exit]'
|
'(-h --help)'{-h,--help}'[show this help message and exit]'
|
||||||
'(-V --version)'{-V,--version}'[show program''s version number and exit]'
|
'(-V --version)'{-V,--version}'[show program''s version number and exit]'
|
||||||
)
|
)
|
||||||
|
|
||||||
_arguments -C $opts \
|
|
||||||
': :->command' \
|
|
||||||
'*:: :->subcmd'
|
|
||||||
|
|
||||||
help_opts=(
|
help_opts=(
|
||||||
'(-h --help)'{-h,--help}'[show the help message and exit]' \
|
'(-h --help)'{-h,--help}'[show the help message and exit]' \
|
||||||
)
|
)
|
||||||
@@ -261,6 +259,10 @@ install_opts=(
|
|||||||
'--alt-hint[Use an alternate algorithm to generate an unsatisfiable hint]' \
|
'--alt-hint[Use an alternate algorithm to generate an unsatisfiable hint]' \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
_arguments -C $opts \
|
||||||
|
': :->command' \
|
||||||
|
'*:: :->subcmd'
|
||||||
|
|
||||||
case $state in
|
case $state in
|
||||||
(command)
|
(command)
|
||||||
__conda_commands
|
__conda_commands
|
||||||
|
|||||||
Reference in New Issue
Block a user