mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Enhancement - tab completion script
- Added a new tab completion script (thanks to Federico Hernandez).
This commit is contained in:
parent
05243c9e7a
commit
e2e5b4884c
6 changed files with 32 additions and 4 deletions
4
AUTHORS
4
AUTHORS
|
@ -1,5 +1,5 @@
|
|||
Principal Author:
|
||||
Paul Beckingham, paul@beckingham.net
|
||||
Paul Beckingham
|
||||
|
||||
Contributing Authors:
|
||||
Damian Glenny
|
||||
|
@ -13,6 +13,7 @@ Contributing Authors:
|
|||
Federico Hernandez
|
||||
T. Charles Yun
|
||||
David J Patrick
|
||||
P.C. Shyamshankar
|
||||
|
||||
With thanks to:
|
||||
Eugene Kramer
|
||||
|
@ -30,5 +31,4 @@ With thanks to:
|
|||
Eric Farris
|
||||
Bruce Dillahunty
|
||||
Askme Too
|
||||
P.C. Shyamshankar
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
other reports.
|
||||
+ New "timesheet" command displays tasks completed and started, per week,
|
||||
and can display multiple weeks.
|
||||
+ New tab completion script, tab_completion.sh, for bash users (thanks
|
||||
to Federico Hernandez).
|
||||
|
||||
------ old releases ------------------------------
|
||||
|
||||
|
|
|
@ -18,5 +18,5 @@ included.
|
|||
color.cpp Color support functions.
|
||||
rules.cpp Auto-colorization rules.
|
||||
|
||||
Don't forget, please send bugs, patches to task@beckingham.net
|
||||
Please send bugs, patches to task@beckingham.net
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
SUBDIRS = src
|
||||
EXTRA_DIST = DEVELOPERS
|
||||
EXTRA_DIST = DEVELOPERS tab_completion.sh
|
||||
|
||||
|
|
|
@ -166,6 +166,8 @@
|
|||
other reports.
|
||||
<li>New "timesheet" command displays tasks completed and started, per week,
|
||||
and can display multiple weeks.
|
||||
<li>New tab completion script, tab_completion.sh, for bash users (thanks
|
||||
to Federico Hernandez).
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
|
|
24
tab_completion.sh
Normal file
24
tab_completion.sh
Normal file
|
@ -0,0 +1,24 @@
|
|||
_task()
|
||||
{
|
||||
local cur prev opts base
|
||||
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
|
||||
opts="add append annotate completed delete undelete info start stop done undo projects tags summary history ghistory next calendar stats import export color version help list long ls newest oldest overdue active"
|
||||
|
||||
case "${prev}" in
|
||||
ls|list|long)
|
||||
if [[ ${cur} == +* ]] ; then
|
||||
local tags=$( task tags | egrep -v 'tags|^$'|sed 's/^/+/' )
|
||||
COMPREPLY=( $(compgen -W "${tags}" -- ${cur}) )
|
||||
return 0
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||
return 0
|
||||
}
|
||||
complete -F _task task
|
Loading…
Add table
Add a link
Reference in a new issue