Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Completion: Fix use of -A and -S options to _arguments
- X-seq: zsh-workers 44252
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: [PATCH] Completion: Fix use of -A and -S options to _arguments
- Date: Thu, 25 Apr 2019 10:00:53 +0200
- Authentication-results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1556179256; bh=nHVSNfIEZ4HrY4UwCgPjdTUE2enGul8L7LHi0yGetSs=; h=From:References:To:Subject:Date:From:Subject; b=NAl1AkM4vcNe+uc2hOtGMJWFXcmJqCJTPLbjEKmdnXhqR/qnbvIJexge824hQCMysY689qc/SLkxX5i0GKYCZ6yPmVM2H5I3amCTzMGdbHQo6HrdxMEgBkM5JdSY6DOBdh1YmZyUI9vqXqop/wNyvZSK3vonkF3j27e/9kGI9BTG3OrgupWWDGKkNIOvi6U7Jkr8a37FX1obt6rGsbfswGn1jXHX+w1gn/nAVWJIkdfpmBlpKCK0CiLiZdKz0KULzO4ibiB0is47Fi12mAXiwqAyFV+edq4hrfCtcudHXpou3EejLkggHTzG91UmSzxshFpbE+QGtD0da3tm7C0Kww==
- In-reply-to: <EF871C33-0FF2-4898-8D2F-93B48FC22E85@dana.is>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author