9dd76fb6bc29071bd616d9ea32e29ce7b4dcba73
- Author
- spacewander <spacewanderlzx@gmail.com>
- Committer
- spacewander <spacewanderlzx@gmail.com>
- Date
Message
add task description to fabric completion
Diff
1diff --git a/plugins/fabric/_fab b/plugins/fabric/_fab
2index 9628e122474052baec84ebae2bc91d11387e3f10..79d596ed6f2fed9536a2abfd7c2fb7ffd7ba8a94 100644
3--- a/plugins/fabric/_fab
4+++ b/plugins/fabric/_fab
5@@ -5,7 +5,10 @@ local curcontext=$curcontext state line
6 declare -A opt_args
7
8 declare target_list
9-target_list=(`fab --shortlist 2>/dev/null`)
10+IFS="$(printf '\n+')" target_list=($(fab -l | awk '{
11+ if(NR > 2)
12+ printf "%s:%s\n", $1, substr($0, index($0, $2))
13+}' 2>/dev/null))
14
15 _targets() {
16 _describe -t commands "fabric targets" target_list