feat: update conda completion to support newer conda versions

This commit is contained in:
Nuri Jung
2024-03-12 21:31:03 +09:00
parent fb6589f23f
commit 05a74fb907
+5 -4
View File
@@ -703,18 +703,19 @@ case $state in
(create) (create)
_arguments -C $help_opts \ _arguments -C $help_opts \
$json_opts \ $json_opts \
'(-n --name)'{-n,--name}'[name of environment]:environment:__conda_envs' \ $env_opts \
'(-f --file)'{-f,--file}'[environment definition]:file:_path_files' \ '(-f --file)'{-f,--file}'[environment definition]:file:_path_files' \
'(-q --quiet)'{-q,--quiet}'[]' \ '(-q --quiet)'{-q,--quiet}'[]' \
;; ;;
(export) (export)
_arguments -C $help_opts \ _arguments -C $help_opts \
'(-n --name)'{-n,--name}'[name of environment]:environment:__conda_envs' \ $env_opts \
'(-f --file)'{-f,--file}'[]:file:_path_files' \ '(-f --file)'{-f,--file}'[]:file:_path_files' \
;; ;;
(list) (list)
_arguments -C $help_opts \ _arguments -C $help_opts \
$json_opts \ $json_opts \
$env_opts
;; ;;
(remove) (remove)
_arguments -C $help_opts \ _arguments -C $help_opts \
@@ -727,7 +728,7 @@ case $state in
(update) (update)
_arguments -C $help_opts \ _arguments -C $help_opts \
$json_opts \ $json_opts \
'(-n --name)'{-n,--name}'[name of environment]:environment:__conda_envs' \ $env_opts \
'(-f --file)'{-f,--file}'[environment definition]:file:_path_files' \ '(-f --file)'{-f,--file}'[environment definition]:file:_path_files' \
'(-q --quiet)'{-q,--quiet}'[]' \ '(-q --quiet)'{-q,--quiet}'[]' \
;; ;;
@@ -738,7 +739,7 @@ case $state in
(activate) (activate)
_arguments -C $help_opts \ _arguments -C $help_opts \
'--stack[activate this environment on top of the previous environment]' \ '--stack[activate this environment on top of the previous environment]' \
'*:environment:__conda_envs' '*:environment:{__conda_envs; _path_files}'
;; ;;
(deactivate) (deactivate)
_arguments -C $help_opts \ _arguments -C $help_opts \