Created
December 30, 2010 13:27
-
-
Save vmlinz/759791 to your computer and use it in GitHub Desktop.
android completion
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 android | |
#autoload | |
local ret=1 state | |
declare -ga global_args | |
global_args=( | |
{-h,--help}"[Help on a specific command.]" | |
{-s,--silent}"[Silent mode: only errors are printed out.]" | |
{-v,--verbose}"[Verbose mode: errors, warnings and information.al messages are printed.]" | |
) | |
_arguments \ | |
$global_args \ | |
':action:->action' \ | |
'*::option:->option' && ret=0 | |
case $state in | |
action) | |
actions=( | |
"create:android actions" | |
"move:android actions" | |
"delete:android actions" | |
"install:android actions" | |
) | |
_describe -t commands 'android action' actions && ret=0 | |
;; | |
option) | |
case $words[1] in | |
create) | |
targets=( | |
"avd:Creates a new Android Virtual Device." | |
"project:Creates a new Android project." | |
"test-project:Creates a new Android project for a test packaXSge." | |
"lib-project:Creates a new Android library project" | |
) | |
_describe -t commands 'android create actions' targets && ret=0 | |
;; | |
esac | |
;; | |
esac | |
return ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment