From bf3424f282050185a7a505012480664a6251ff6f Mon Sep 17 00:00:00 2001 From: Valentin Haenel Date: Tue, 10 Feb 2015 16:24:02 +0100 Subject: [PATCH] autocomplete installed packages --- _conda | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/_conda b/_conda index e3deb34..1cc3e5e 100644 --- a/_conda +++ b/_conda @@ -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]' \