Enhancement

- Solve bug #962.
- Improve completion by proposing column names (used when filtering and
  modifying tasks).
This commit is contained in:
Louis-Claude Canon 2012-06-03 18:55:41 +02:00 committed by Paul Beckingham
parent 1201d0b485
commit bc2addeb41
2 changed files with 28 additions and 1 deletions

View file

@ -30,6 +30,7 @@ Features
+ Possible to specify the date format when editing with 'dateformat.edit'. + Possible to specify the date format when editing with 'dateformat.edit'.
+ Possible to specify the date format when showing information about a task + Possible to specify the date format when showing information about a task
with 'dateformat.info'. with 'dateformat.info'.
+ Bash script improvement (column names are now completed).
Bugs Bugs
+ Applied patch for bug #919, so the holidays listed on the 'calendar' report + Applied patch for bug #919, so the holidays listed on the 'calendar' report
@ -84,6 +85,8 @@ Bugs
that lack description or entry date (thanks to Nicholas Rabenau). that lack description or entry date (thanks to Nicholas Rabenau).
+ Fixed bug #1017, which exported invalid JSON when there were no tasks (thanks + Fixed bug #1017, which exported invalid JSON when there were no tasks (thanks
to Nicholas Rabenau). to Nicholas Rabenau).
+ Fixed bug #962 that rename the bash completion script in prevision of future
2.0 bash release.
------ old releases ------------------------------ ------ old releases ------------------------------

View file

@ -59,6 +59,14 @@ _task_get_config() {
task _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() { _task_offer_projects() {
COMPREPLY=( $(compgen -W "$(task _projects)" -- ${cur/*:/}) ) COMPREPLY=( $(compgen -W "$(task _projects)" -- ${cur/*:/}) )
} }
@ -80,11 +88,19 @@ _task()
# echo "prev='$prev'" # echo "prev='$prev'"
# echo "prev2='$prev2'" # echo "prev2='$prev2'"
opts="$(task _commands) $(task _ids)" opts="$(task _commands) $(task _ids) $(task _columns)"
case "${prev}" in case "${prev}" in
:) :)
case "${prev2}" in case "${prev2}" in
dep*)
_task_offer_dependencies
return 0
;;
pri*)
_task_offer_priorities
return 0
;;
pro*) pro*)
_task_offer_projects _task_offer_projects
return 0 return 0
@ -99,6 +115,14 @@ _task()
;; ;;
:) :)
case "${prev}" in case "${prev}" in
dep*)
_task_offer_dependencies
return 0
;;
pri*)
_task_offer_priorities
return 0
;;
pro*) pro*)
_task_offer_projects _task_offer_projects
return 0 return 0