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

Re: PATCH: vux/vuxctl completion



Clint Adams wrote:
> For vux 0.4.8.

> Index: Completion/Unix/Command/_vux
> +#compdef vux vuxctl
> +
> +case "$service" in
> +	(vux)

Sorry to winge about this but could we please have consistency on
indentation across completion functions. Convention is for two spaces.

> +
> +_arguments -s -C \
> +	'-x:action:(p g m w r f)' \

Those actions could really do with descriptions:
  '...:((p\:description g\:...))'
works.

> +	compadd start clean double half up down next previous forward \
> +		replay pause resume stop reload save history help

This should really have an _wanted before it. We should never be adding
matches without some sort of description.

> Index: Completion/Unix/Command/_mtr
> 
> +       '(--report)-r[report]' \
> +       '(-r)--report' \
> +       '(--report--cycles)-c[report cycles]:count:' \
> +       '(-c)--report-cycles:count:' \

Since in 4.1, matches are grouped where they have the same description,
it is much nicer to give the description to both the long and short
option. The convention is to do this with brace expansion:

  '(-r --report)'{-r,--report}'[report]' \
  '(-c --report-cycles)'{-c,--report-cycles}'[report cycles]:count' \

Except the descriptions could be rather more, um, descriptive.

Oliver



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