Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Completion for aplay from alsa-utils



On 25 Nov 2019, at 06:10, Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx> wrote:
> Ok, it has been resolved – the exclusion for -v and --verbose was
> causing the repeat-problem. After removing the exclusion, the options
> can be repeated.

More things, sry:

> +  '(-h --help)'{-h,--help}'[print help message]'
> +  --version'[print current version]'

Usually options that can't be used together with any other arguments, like
these two, are made fully exclusive via `(: * -)` or similar

> +  '(-D+ --device=)'{-D+,--device=}'[select PCM by name]'

You can't put the +/= syntax in the exclusion thing, it won't match like that.
See my earlier example

> +_arguments -sS $opts

This needs to be `-s -S`, per the documentation i mentioned before:

> Options to _arguments itself must be in separate words, i.e. -s -w, not -sw.

dana



Messages sorted by: Reverse Date, Date, Thread, Author