Add support for conda activate|deactivate, with environment autocomplete

This commit is contained in:
Taylor Beck
2019-02-08 19:08:31 -08:00
parent 4adb4412d9
commit 443bae7421

10
_conda
View File

@@ -287,6 +287,8 @@ __conda_commands(){
list:'List linked packages in a conda environment.'
remove:'Remove a list of packages from a specified conda environment.'
uninstall:'Alias for conda remove'
activate:'Activate an environment; alias for source activate'
deactivate:'Deactivate an environment; alias for source deactivate'
)
help=(
help:'Displays a list of available conda commands and their help strings.'
@@ -609,6 +611,14 @@ case $state in
;;
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