Skip to content

Instantly share code, notes, and snippets.

@mike-douglas
Last active December 12, 2015 01:39
Show Gist options
  • Save mike-douglas/4693012 to your computer and use it in GitHub Desktop.
Save mike-douglas/4693012 to your computer and use it in GitHub Desktop.
ZSH completion recipe for Fabric files
#compdef fab
_fabric() {
_arguments -C -s \
'(-H)'-H'[Sets the host(s)]:Host:_hosts' \
'*:: :->subcmds' && return 0
if (( CURRENT > 0 )); then
sub_command=(${$($name -l|tail -n+2)%f})
_describe -t commands "Fabric Commands" sub_command -V1
fi
}
_fabric "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment