From f1b8232de80d7f52817254ab661a96f02369caed Mon Sep 17 00:00:00 2001 From: Valentin Haenel Date: Fri, 13 Feb 2015 00:18:19 +0100 Subject: [PATCH] complete channels properly --- _conda | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/_conda b/_conda index c9a901a..d760025 100644 --- a/_conda +++ b/_conda @@ -30,6 +30,7 @@ # * v0.2 # # * completion cache for packages +# * complete all channels defined in .condarc # # * v0.1 # @@ -93,7 +94,14 @@ for k in parsed.keys(): __conda_channels(){ local -a channels - channels=(default system) + channels=($(conda config --json --get channels| + python -c " +import json, sys +channels = json.load(sys.stdin)['get']['channels'] +for c in channels: + print(c) + ")) + channels+=(system) _describe -t channels 'conda channels' channels }