Skip to content

Instantly share code, notes, and snippets.

@kanru
Created February 14, 2012 05:53
Show Gist options
  • Save kanru/1824058 to your computer and use it in GitHub Desktop.
Save kanru/1824058 to your computer and use it in GitHub Desktop.
Mercurial "qqueue" Zsh completion file
#compdef hg_cmd_qqueue
declare -A opt_args
_hg_queues() {
typeset -a queues
queues=(${(f)"$(_hg_cmd qqueue --quiet)"})
(( $#queues )) && _describe -t hg-queues 'queues' queues
}
_arguments -s -w \
'--list' \
'--create' \
'--rename' \
'--delete' \
'--purge' \
'*:queues:_hg_queues'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment