Last active
December 12, 2015 01:39
-
-
Save mike-douglas/4693012 to your computer and use it in GitHub Desktop.
ZSH completion recipe for Fabric files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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