We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84da803 commit 393712eCopy full SHA for 393712e
completion/task.bash
@@ -0,0 +1,21 @@
1
+_task_completion()
2
+{
3
+ local scripts;
4
+ local curr_arg;
5
+
6
+ # Remove colon from work breaks
7
+ COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
8
9
+ scripts=$(task -l | sed '1d' | sed 's/^\* //' | awk '{ print $1 }');
10
11
+ curr_arg="${COMP_WORDS[COMP_CWORD]:-"."}"
12
13
+ # Do not accept more than 1 argument
14
+ if [ "${#COMP_WORDS[@]}" != "2" ]; then
15
+ return
16
+ fi
17
18
+ COMPREPLY=($(compgen -c | echo "$scripts" | grep $curr_arg));
19
+}
20
21
+complete -F _task_completion task
0 commit comments