mirror of
https://github.com/conda-incubator/conda-zsh-completion.git
synced 2026-10-20 04:25:20 +08:00
Add support for conda activate|deactivate, with environment autocomplete
This commit is contained in:
@@ -287,6 +287,8 @@ __conda_commands(){
|
|||||||
list:'List linked packages in a conda environment.'
|
list:'List linked packages in a conda environment.'
|
||||||
remove:'Remove a list of packages from a specified conda environment.'
|
remove:'Remove a list of packages from a specified conda environment.'
|
||||||
uninstall:'Alias for conda remove'
|
uninstall:'Alias for conda remove'
|
||||||
|
activate:'Activate an environment; alias for source activate'
|
||||||
|
deactivate:'Deactivate an environment; alias for source deactivate'
|
||||||
)
|
)
|
||||||
help=(
|
help=(
|
||||||
help:'Displays a list of available conda commands and their help strings.'
|
help:'Displays a list of available conda commands and their help strings.'
|
||||||
@@ -609,6 +611,14 @@ case $state in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
(activate)
|
||||||
|
_arguments -C $help_opts \
|
||||||
|
'--stack[activate this environment on top of the previous environment]' \
|
||||||
|
'*:environment:__conda_envs'
|
||||||
|
;;
|
||||||
|
(deactivate)
|
||||||
|
_arguments -C $help_opts \
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
Reference in New Issue
Block a user