Skip to content

Commit f3c901b

Browse files
AntoineGagnenikolassv
authored andcommitted
Improve task completion
1 parent e28f309 commit f3c901b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

misc/_bartib

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#compdef bartib
22

33
_bartib_tasks() {
4-
local -a _tasks=($(bartib last | awk 'NR > 2 {print $1}' | tr -d '[]' | sort | tr '\n' ' '))
4+
local -a _tasks=($(bartib last | head -n -1 | awk 'BEGIN { a="" } NR > 2 {for (i=2; i <= NF - 1; i++) { if (i != 2) { a=a" "$i; } else { a=$i } } gsub("[\[\]]", "", $1); printf("%s[%s]\n", $1, a)}' | tr '\n' ' '))
55

6-
_values "NUMBER" ${_tasks[@]}
6+
_values "TASK" ${_tasks[@]}
77
}
88

99
_bartib_projects() {

0 commit comments

Comments
 (0)