autocomplete installed packages

This commit is contained in:
Valentin Haenel
2015-02-10 16:24:02 +01:00
parent 7cd21c4756
commit bf3424f282

7
_conda
View File

@@ -12,6 +12,12 @@ __conda_envs(){
}
__conda_packages_installed(){
local -a packages
packages=($(conda list | sed 1,2d | cut -f1 -d' '))
_describe -t packages 'installed packages' packages
}
__conda_packages_search(){
local -a packages
packages=($(conda search --use-index-cache --json |
@@ -126,6 +132,7 @@ case $state in
(update)
_arguments -C $install_opts \
'--all[Update all installed packages in the environment]' \
'*:packages:__conda_packages_installed' \
;;
(help)
_arguments -C '(-h --help)'{-h,--help}'[show the help message and exit]' \