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

Re: [PATCH] _git: Add completion for help subcommand



On Thu, 26 Aug 2010, Nikolai Weibull wrote:

> On Sat, Aug 21, 2010 at 14:21, Aaron Schrab wrote:
> 
> Seems fine except for this:
> 
> > + Âlocal formats='(--info -i --man -m --web -w)'
> 
> Although this is sort of nice it doesnât follow the style of this or 
> other completion files, so please write out the whole list in each 
> line.

Doesn't seem very common, but a quick grep[1] of Completion/Unix/Command 
shows at least the following use that style to an extent:

_bogoutil
_cvs
_global
_iconv
_whois
_wiggle

It always kind of bothered me that more didn't.

e.g. the lines in _git starting:

'(--name-only --name-status -u -p --stat --patch-with-stat [...]
'(--name-only --name-status -u -p --stat --patch-with-stat [...]
'(--name-only --name-status -u -p --stat --patch-with-stat [...]
'(--name-only --name-status -u -p --stat --patch-with-stat [...]
'(--name-only --name-status -u -p --stat --patch-with-stat [...]

It's just visual clutter.  Is there a particular reason not to use a 
variable?

-- 
Best,
Ben

[1] many false positives, but:
grep $'^\\s*["\'].*\\$' Completion/Unix/Command/*


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