Created
August 19, 2012 19:18
-
-
Save esteele/3397113 to your computer and use it in GitHub Desktop.
zsh completion for mr.developer
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 develop | |
local subcmds | |
subcmds=( | |
'activate' | |
'checkout' | |
'deactivate' | |
'help' | |
'info' | |
'list' | |
'purge' | |
'rebuild' | |
'reset' | |
'status' | |
'update' | |
) | |
_arguments -C \ | |
"-h, --help show this help message and exit." \ | |
"-a, --auto-checkout Only considers packages declared by auto-checkout. If you don't specify a <package-regexps> then all declared packages are processed." \ | |
"-c, --checked-out Only considers packages currently checked out. If you don't specify a <package-regexps> then all checked out packages are processed." \ | |
"-d, --develop Only considers packages currently in development mode. If you don't specify a <package-regexps> then all develop packages are processed." \ | |
"-v, --verbose Show output of VCS command." \ | |
"*::command:->command" \ | |
&& return 0 | |
case $state in | |
command) | |
if ((CURRENT == 1)); then | |
state=subcommands | |
else | |
state=packagename | |
fi | |
;; | |
esac | |
case $state in | |
subcommands) | |
_describe -t commands 'develop commands' subcmds | |
;; | |
packagename) | |
activepackagelist=($(bin/develop list)) | |
_describe -t commands 'available packages' activepackagelist | |
;; | |
esac | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment