summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorspacewander <spacewanderlzx@gmail.com>2016-09-23 12:02:23 +0800
committerspacewander <spacewanderlzx@gmail.com>2016-09-23 12:02:23 +0800
commit9dd76fb6bc29071bd616d9ea32e29ce7b4dcba73 (patch)
tree3111f2f09bcd658d49d01d7f8f3089a17d954b5c /plugins
parent1b7fc2f3aca32ba8713be0e27305c5cf578033f6 (diff)
downloadzsh-9dd76fb6bc29071bd616d9ea32e29ce7b4dcba73.tar.gz
zsh-9dd76fb6bc29071bd616d9ea32e29ce7b4dcba73.tar.bz2
zsh-9dd76fb6bc29071bd616d9ea32e29ce7b4dcba73.zip
add task description to fabric completion
Diffstat (limited to 'plugins')
-rw-r--r--plugins/fabric/_fab5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/fabric/_fab b/plugins/fabric/_fab
index 9628e1224..79d596ed6 100644
--- a/plugins/fabric/_fab
+++ b/plugins/fabric/_fab
@@ -5,7 +5,10 @@ local curcontext=$curcontext state line
declare -A opt_args
declare target_list
-target_list=(`fab --shortlist 2>/dev/null`)
+IFS="$(printf '\n+')" target_list=($(fab -l | awk '{
+ if(NR > 2)
+ printf "%s:%s\n", $1, substr($0, index($0, $2))
+}' 2>/dev/null))
_targets() {
_describe -t commands "fabric targets" target_list