zsh-users
 help / color / mirror / code / Atom feed
From: dana <dana@dana.is>
To: Daniel Shahaf <d.s@daniel.shahaf.name>
Cc: Aurélien <orel_jf@yahoo.fr>, zsh-users <zsh-users@zsh.org>
Subject: Re: help for writing GNU stow completion
Date: Thu, 15 Aug 2019 20:54:41 -0500	[thread overview]
Message-ID: <2EC532C0-D2E5-4F43-9EA5-52DBCDCCC18F@dana.is> (raw)
In-Reply-To: <e1a43314-3702-4bee-90cd-cde6b384f9d1@www.fastmail.com>

On 15 Aug 2019, at 20:28, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> This would run the code being typed on the command line in cases
> such as «--dir *(+f)» and «--dir $(sudo pwd)», wouldn't it?

Yeah, i guess it would.

On 15 Aug 2019, at 20:28, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> I think you want ${^stow_pkg_list} in the second instance, don't you?

I was assuming that you'd only ever expect a single argument. If the user did
something like `stow --dir=$arr` or `stow --dir=$( print a b c)`, only the
first element of the expansion would be the optarg; any others would probably
be operands.

But then of course it's possible for someone to do like `--dir={a,b,c}` or
`--dir=$^foo`, and at that point i don't think there's *anything* sane you
could do from inside that helper function.

Stuff like that is probably why most functions don't try to do this

dana


  reply	other threads:[~2019-08-16  1:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-06 17:04 Aurélien
2019-08-15 23:36 ` dana
2019-08-16  1:28   ` Daniel Shahaf
2019-08-16  1:54     ` dana [this message]
2019-08-17  7:48   ` Aurélien

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=2EC532C0-D2E5-4F43-9EA5-52DBCDCCC18F@dana.is \
    --to=dana@dana.is \
    --cc=d.s@daniel.shahaf.name \
    --cc=orel_jf@yahoo.fr \
    --cc=zsh-users@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).