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

Re: Completion for aplay from alsa-utils



On 2 Nov 2019, at 16:13, Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx> wrote:
> the submitted completion is in file _alsa-utils

Feels like maybe it should just be called _aplay, unless you think there would
be so much shared code between future alsa-utils completion functions that
they all need to live together in one (not sure but doesn't seem like it)

And you can add arecord to #compdef, since it's basically the same thing as
aplay

Some functional issues i noticed:

* _arguments should have -S

* There are no exclusions for any of the alias options (e.g., -D and --device
  should be exclusive)

* --device, --file-type, and --process-id-file should take arguments

* All short aliases of long options that take an argument should have + (e.g.,
  -c+ for --channels=)

* -v is cumulative, but there is no * in the spec

Would also be nice to have better optarg completion (there are no argument
descriptions, some of the options take pre-defined arguments that are listed
in the documentation that you could offer, &c.), and taking the option
descriptions from the help output verbatim doesn't look that nice here, but
i'm probably being too pedantic now

dana



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