App-MusicTools
view release on metacpan or search on metacpan
zsh-compdef/_vov view on Meta::CPAN
#compdef vov
#
# ZSH completion for vov. Install to a $fpath directory. Consult the
# perl distribution of the App::MusicTools module for the related CLI
# program. This completion is from the zsh-compdef/ subdirectory of that
# perl distribution.
local curcontext="$curcontext" state line
typeset -A opt_args
# XXX simplistic, really should feed to a case then figure out where in
# numeral cursor is, what to offer from there, including b# prefix or **
# or the like suffixes.
local -a numerals
numerals=(I II III IV V VI VII i ii iii iv v vi vii)
# transpose can take numbers, but simplier to just show possible notes
_arguments \
'--factor=[default chord factor]:factor:(1 3 5 7 9 11 13)' \
'(--noflats)--flats[print notes as flats]' \
'(--flats)--noflats[print notes not as flats]' \
'(- *)--listmodes[show available modes]' \
'(--mode --minor)--minor[minor mode]' \
'(--mode --minor)--mode=[musical mode]:mode:->modes' \
'--natural[ignore case distinctions of input numerals]' \
'--outputtmpl=[custom output template]:template:' \
'--raw[show pitch numbers not note names]' \
'--transpose=[transpose by or to]:noteornum:(a b d e f g cis dis fis gis ais des ees ges aes bes)' \
'*: :_values -s / "numerals" $numerals' \
&& return 0
case "$state" in
modes)
_wanted mode expl 'mode' compadd $(_call_program mode vov --listmodes)
;;
esac
( run in 1.053 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )