mirror of
https://github.com/conda-incubator/conda-zsh-completion.git
synced 2026-03-04 06:14:59 +08:00
offer to remove only those values that are defined
This commit is contained in:
10
_conda
10
_conda
@@ -107,7 +107,13 @@ values = json.load(sys.stdin)['get']['$search_term']
|
||||
for v in values:
|
||||
print(v)
|
||||
"))
|
||||
print $config_values
|
||||
print -l $config_values
|
||||
}
|
||||
|
||||
__conda_config_values_describe(){
|
||||
local -a config_values
|
||||
config_values=($( __conda_config_values $1 ))
|
||||
_describe -t config_values 'configuration values' config_values
|
||||
}
|
||||
|
||||
__conda_channels(){
|
||||
@@ -327,7 +333,7 @@ case $state in
|
||||
'( --add --set --remove --remove-key)--get[get the configuration value]:key:__conda_config' \
|
||||
'(--get --set --remove --remove-key)--add[add one configuration value to a list key]:key:__conda_config:value:' \
|
||||
'(--get --add --remove --remove-key)--set[set a boolean key]:key:__conda_config:value:' \
|
||||
'(--get --add --set --remove-key)--remove[remove a configuration value from a list key]:key:__conda_config:value' \
|
||||
'(--get --add --set --remove-key)--remove[remove a configuration value from a list key]:key:__conda_config:value:{__conda_config_values_describe '$last_item'}' \
|
||||
'(--get --add --set --remove )--remove-key[remove a configuration key (and all its values)]:key:__conda_config' \
|
||||
'(-f --force)'{-f,--force}'[write to the config file using the yaml parser]' \
|
||||
$get_opts
|
||||
|
||||
Reference in New Issue
Block a user