Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Completion: Add _log_priorities, _logger
On 2 Nov 2019, at 02:45, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> Strange how? I think it's pretty intuitive: to call «_foo "$bar[@]"»,
> write «_foo -Y"${^bar[@]}"» (?). This is...
> - Completely generic...
> - Composable...
> - Requires no new code to implement
All true, yeah. And you kind of implied it in your first bullet, but, to call
attention to it, a nice thing about that method is that it also extends to
(positional) operands. The -Ya thing i suggested wouldn't do that. (On the
other hand you pretty much never want to pass operands through a type function
to compadd, so idk if it matters.)
My main (only?) issue with it is just that it looks a bit visually messy to
me. Calling it with -Y$^arr is succinct enough, but you'll rarely do that in
practice, as arguments to type functions are usually written out at the point
of call. So you'd see a lot more of the `-Y-a -Y"my optarg" -Y-bcd` kind
of stuff.
dana
Messages sorted by:
Reverse Date,
Date,
Thread,
Author