diff options
Diffstat (limited to 'plugins/taskwarrior')
-rw-r--r-- | plugins/taskwarrior/README.md | 2 | ||||
-rw-r--r-- | plugins/taskwarrior/_task | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/plugins/taskwarrior/README.md b/plugins/taskwarrior/README.md index 053151e78..2a86510dd 100644 --- a/plugins/taskwarrior/README.md +++ b/plugins/taskwarrior/README.md @@ -1,6 +1,6 @@ # taskwarrior -This plugin adds smart tab completion for [TaskWarrior](http://taskwarrior.org/). +This plugin adds smart tab completion for [TaskWarrior](https://taskwarrior.org/). It uses the zsh tab completion script (`_task`) shipped with TaskWarrior for the completion definitions. diff --git a/plugins/taskwarrior/_task b/plugins/taskwarrior/_task index afa30d45a..c38d6cad9 100644 --- a/plugins/taskwarrior/_task +++ b/plugins/taskwarrior/_task @@ -1,6 +1,6 @@ #compdef task # -# Copyright 2010 - 2015 Johannes Schlatow +# Copyright 2010 - 2016 Johannes Schlatow # Copyright 2009 P.C. Shyamshankar # # Permission is hereby granted, free of charge, to any person obtaining a copy @@ -21,12 +21,11 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # -# http://www.opensource.org/licenses/mit-license.php +# https://www.opensource.org/licenses/mit-license.php # typeset -g _task_cmds _task_projects _task_tags _task_config _task_modifiers _task_projects=($(task _projects)) _task_tags=($(task _tags)) -_task_ids=($(task _ids)) _task_zshids=( ${(f)"$(task _zshids)"} ) _task_config=($(task _config)) _task_columns=($(task _columns)) @@ -139,8 +138,10 @@ task_dates=( ) local -a task_zshids -_regex_words values 'task IDs' $_task_zshids -task_zshids=("$reply[@]") +if (( $#_task_zshids )); then + _regex_words values 'task IDs' $_task_zshids + task_zshids=("$reply[@]") +fi _regex_words values 'task frequencies' \ 'daily:Every day' \ |