mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-19 09:53:08 +02:00
Enhancement
- Solve bug #962. - Improve completion by proposing column names (used when filtering and modifying tasks).
This commit is contained in:
parent
1201d0b485
commit
bc2addeb41
2 changed files with 28 additions and 1 deletions
|
@ -59,6 +59,14 @@ _task_get_config() {
|
|||
task _config
|
||||
}
|
||||
|
||||
_task_offer_dependencies() {
|
||||
COMPREPLY=( $(compgen -W "$(task _ids)" -- ${cur/*:/}) )
|
||||
}
|
||||
|
||||
_task_offer_priorities() {
|
||||
COMPREPLY=( $(compgen -W "L M H" -- ${cur/*:/}) )
|
||||
}
|
||||
|
||||
_task_offer_projects() {
|
||||
COMPREPLY=( $(compgen -W "$(task _projects)" -- ${cur/*:/}) )
|
||||
}
|
||||
|
@ -80,11 +88,19 @@ _task()
|
|||
# echo "prev='$prev'"
|
||||
# echo "prev2='$prev2'"
|
||||
|
||||
opts="$(task _commands) $(task _ids)"
|
||||
opts="$(task _commands) $(task _ids) $(task _columns)"
|
||||
|
||||
case "${prev}" in
|
||||
:)
|
||||
case "${prev2}" in
|
||||
dep*)
|
||||
_task_offer_dependencies
|
||||
return 0
|
||||
;;
|
||||
pri*)
|
||||
_task_offer_priorities
|
||||
return 0
|
||||
;;
|
||||
pro*)
|
||||
_task_offer_projects
|
||||
return 0
|
||||
|
@ -99,6 +115,14 @@ _task()
|
|||
;;
|
||||
:)
|
||||
case "${prev}" in
|
||||
dep*)
|
||||
_task_offer_dependencies
|
||||
return 0
|
||||
;;
|
||||
pri*)
|
||||
_task_offer_priorities
|
||||
return 0
|
||||
;;
|
||||
pro*)
|
||||
_task_offer_projects
|
||||
return 0
|
Loading…
Add table
Add a link
Reference in a new issue