2011-08-31 05:16:15 +02:00
|
|
|
# Complete task.
|
|
|
|
completion_file="${0:h}/_task"
|
|
|
|
if [[ ! -e "$completion_file" ]] && ; then
|
|
|
|
if [[ -L "$completion_file" ]]; then
|
|
|
|
unlink "$completion_file" 2> /dev/null
|
|
|
|
fi
|
2011-08-26 08:58:19 +02:00
|
|
|
|
2011-08-31 05:16:15 +02:00
|
|
|
if (( $+commands[taskwarrior] )); then
|
|
|
|
ln -s \
|
|
|
|
"${commands[task]:h:h}/share/doc/task/scripts/zsh/_task" \
|
|
|
|
"$completion_file" \
|
|
|
|
2> /dev/null
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
unset completion_file
|
|
|
|
|
|
|
|
# Style
|
2011-08-26 08:58:19 +02:00
|
|
|
zstyle ':completion:*:*:task:*' verbose yes
|
|
|
|
zstyle ':completion:*:*:task:*:descriptions' format '%U%B%d%b%u'
|
|
|
|
zstyle ':completion:*:*:task:*' group-name ''
|
|
|
|
|
2011-08-31 05:16:15 +02:00
|
|
|
# Aliases
|
2011-08-26 08:58:19 +02:00
|
|
|
alias t=task
|
|
|
|
compdef _task t=task
|
2011-08-31 05:16:15 +02:00
|
|
|
|