zsh-workers
 help / color / mirror / code / Atom feed
From: dana <dana@dana.is>
To: Daniel Shahaf <d.s@daniel.shahaf.name>
Cc: zsh-workers@zsh.org
Subject: Re: [PATCH] Completion: Add _log_priorities, _logger
Date: Sat, 2 Nov 2019 03:20:58 -0500	[thread overview]
Message-ID: <34BB72BA-0317-48E6-828C-9D6193C2F34C@dana.is> (raw)
In-Reply-To: <6dd17886-7097-4f7f-b254-f17ef861abf4@www.fastmail.com>

On 2 Nov 2019, at 02:45, Daniel Shahaf <d.s@daniel.shahaf.name> 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


      reply	other threads:[~2019-11-02  8:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-02  2:14 dana
2019-11-02  5:54 ` Daniel Shahaf
2019-11-02  6:45   ` dana
2019-11-02  6:58     ` dana
2019-11-02  7:45       ` Daniel Shahaf
2019-11-02  8:20         ` dana [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=34BB72BA-0317-48E6-828C-9D6193C2F34C@dana.is \
    --to=dana@dana.is \
    --cc=d.s@daniel.shahaf.name \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).