zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Zsh workers <zsh-workers@zsh.org>
Subject: Re: [PATCH] Completion: Fix use of -A and -S options to _arguments
Date: Thu, 25 Apr 2019 10:00:53 +0200	[thread overview]
Message-ID: <41573-1556179253.473258@hVwb.tmqp.nbJZ> (raw)
In-Reply-To: <EF871C33-0FF2-4898-8D2F-93B48FC22E85@dana.is>

dana wrote:
> Patch #2: Make use of the -A and -S options to _arguments consistent in these
> functions.
>
> I can't think of any reason you would ever *not* want to use -S for these, but

Generally, it's purely a question of does the command-line parser for
the command in question allow options after ???--???.

> someone did go out of their way to make it conditional in _ln ??? if anyone
> knows why that might be, please tell me.

I went to check on the assumption that it was likely to have been me
but it wasn't. Given that it is done conditionally for GNU, I'd guess that
???-S??? got confused with ???-A "-*"???. In general, GNU tools tend to allow
options after other arguments while it is less common elsewhere. -- is
more widely recognised.

> Aside: The use of *:: in _ln and _rm prevents those functions from offering
> options after an operand has been given. I can't recall if this behaviour has
> ever been discussed here before ??? is there a way to deal with it?

It is behaviour I was aware of and know that I thought about it when I
was making changes to the comparguments. There were at least a couple of
such oddities that I was reluctant to change for backward compatibility
reasons and there may have been reasons for it that are apparent when
you dig into the code. In combination with a state, it isn't really
fixable. I don't remember if it has been explicitly discussed as such.

Oliver

      reply	other threads:[~2019-04-25  8:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-24 17:59 dana
2019-04-25  8:00 ` Oliver Kiddle [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=41573-1556179253.473258@hVwb.tmqp.nbJZ \
    --to=okiddle@yahoo.co.uk \
    --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).