Parent directory

task.plugin.zsh

450 bytes
 1# Autocompletion for the task CLI (task).
 2if (( !$+commands[task] )); then
 3  return
 4fi
 5# If the completion file doesn't exist yet, we need to autoload it and
 6# bind it to `task`. Otherwise, compinit will have already done that.
 7if [[ ! -f "$ZSH_CACHE_DIR/completions/_task" ]]; then
 8  typeset -g -A _comps
 9  autoload -Uz _task
10  _comps[task]=_task
11fi
12
13# Generate and load task completion
14task --completion zsh >! "$ZSH_CACHE_DIR/completions/_task" &|