App-Spec
view release on metacpan or search on metacpan
examples/zsh/_myapp view on Meta::CPAN
#compdef myapp
# Generated with perl module App::Spec v0.000
_myapp() {
local program=myapp
typeset -A opt_args
local curcontext="$curcontext" state line context
# ---- Command:
_arguments -s \
'1: :->cmd1' \
'*: :->args' \
&& ret=0
case $state in
cmd1)
_alternative 'args:cmd2:((config\:"configuration" convert\:"Various unit conversions" cook\:"Cook something" data\:"output some data" help\:"Show command help" palindrome\:"Check if a string is a palindrome" weather\:"Weather"))'
;;
args)
case $line[1] in
_meta)
# ---- Command: _meta
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'*: :->args' \
&& ret=0
case $state in
cmd2)
_alternative 'args:cmd3:((completion\:"Shell completion functions" pod\:"Pod documentation"))'
;;
args)
case $line[2] in
completion)
# ---- Command: _meta completion
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'3: :->cmd3' \
'*: :->args' \
&& ret=0
case $state in
cmd3)
_alternative 'args:cmd4:((generate\:"Generate self completion"))'
;;
args)
case $line[3] in
generate)
# ---- Command: _meta completion generate
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'3: :->cmd3' \
'*--verbose[be verbose]' \
'*-v[be verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
'--format[Format output]:format:("JSON" "YAML" "Table" "Data\:\:Dumper" "Data\:\:Dump")' \
'--name[name of the program (optional, override name in spec)]:name' \
'--zsh[for zsh]' \
'--bash[for bash]' \
&& ret=0
;;
esac
( run in 1.101 second using v1.01-cache-2.11-cpan-39bf76dae61 )