mirror of
https://github.com/conda-incubator/conda-zsh-completion.git
synced 2026-03-04 06:14:59 +08:00
localize some more variables
This commit is contained in:
12
_conda
12
_conda
@@ -138,6 +138,8 @@ __conda_channels(){
|
||||
_describe -t channels 'conda channels' channels
|
||||
}
|
||||
|
||||
local -a __conda_boolean_config_keys __conda_list_config_keys __conda_config_keys
|
||||
|
||||
__conda_boolean_config_keys=(
|
||||
'add_binstar_token'
|
||||
'always_yes'
|
||||
@@ -217,16 +219,12 @@ _conda_caching_policy() {
|
||||
(( $#oldp ))
|
||||
}
|
||||
|
||||
local -a opts
|
||||
local -a opts help_opts json_opts env_opts channel_opts install_opts
|
||||
opts=(
|
||||
'(-h --help)'{-h,--help}'[show this help message and exit]'
|
||||
'(-V --version)'{-V,--version}'[show program''s version number and exit]'
|
||||
)
|
||||
|
||||
_arguments -C $opts \
|
||||
': :->command' \
|
||||
'*:: :->subcmd'
|
||||
|
||||
help_opts=(
|
||||
'(-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]' \
|
||||
)
|
||||
|
||||
_arguments -C $opts \
|
||||
': :->command' \
|
||||
'*:: :->subcmd'
|
||||
|
||||
case $state in
|
||||
(command)
|
||||
__conda_commands
|
||||
|
||||
Reference in New Issue
Block a user