From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: "Tanaka Akira" <akr@m17n.org>, <zsh-workers@sunsite.auc.dk>
Subject: RE: PATCH: Re: sudo completion problem
Date: Sat, 6 May 2000 11:51:56 +0400 [thread overview]
Message-ID: <000901bfb72f$f33d73e0$21c9ca95@mow.siemens.ru> (raw)
In-Reply-To: <hvoitwsnn23.fsf@serein.m17n.org>
>
> > - can somebody comment on long options case - is it
> expected behaviour?
> > Note, that I mean in this case "GNU long options". In this
> case, again,
> > _arguments should differentiate bewteen long and short
> case, again with
> > option. There are enough commands out there that use "long"
> options but
> > not GNU ones.
>
> It's not differences between long and short. It's caused by the
> difference between traditional getopt and GNU getopt.
>
Yes, that is what I meant.
> By default, GNU getopt permutes argv and finds options on anywhere
> (until `--').
>
> If we can easily find out whether a command is linked with GNU getopt
> or not, we can (and should) complete correctly.
>
Well, hence I wrote "option for _arguments" for those commands, that use
GNU getopt.
> But I think the current behavior is not bad because it completes all
> correct (and some non-correct) candidates. If _arguments behavior is
> changed as you said, it completes only subset of correct candidates.
>
No, it does not complete "corect" canditates. It completes totally wrong
set - options instead of arguments (files in case of diff). And this
change was introduced a couple of weeks ago ... and nobody has ever
complained before.
I think, old behaviour is "the least evil" case because it applies in
most cases. Apart from GNU getopt, there are commands that may intemix
options and arguments (with semantic - "this option applies to following
arguments" - do not have example ready) - but these are really special
cases and should be treated as such.
-andrej
next prev parent reply other threads:[~2000-05-06 7:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-03 14:42 Sven Wischnowsky
2000-05-03 14:56 ` Andrej Borsenkow
2000-05-03 15:09 ` Zefram
2000-05-04 7:23 ` Andrej Borsenkow
2000-05-04 12:02 ` Tanaka Akira
2000-05-04 13:40 ` Sven Wischnowsky
2000-05-04 15:14 ` Completing for "find" and _regex_arguments (Re: PATCH: Re: sudo completion problem) Bart Schaefer
2000-05-04 16:16 ` Tanaka Akira
2000-05-04 20:12 ` PATCH: Re: sudo completion problem Tanaka Akira
2000-05-04 20:40 ` Tanaka Akira
2000-05-06 6:56 ` Andrej Borsenkow
2000-05-06 7:40 ` Tanaka Akira
2000-05-06 7:51 ` Andrej Borsenkow [this message]
2000-05-06 8:19 ` Zefram
2000-05-04 8:03 Sven Wischnowsky
2000-05-08 9:00 Sven Wischnowsky
2000-05-08 15:25 ` Tanaka Akira
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='000901bfb72f$f33d73e0$21c9ca95@mow.siemens.ru' \
--to=andrej.borsenkow@mow.siemens.ru \
--cc=akr@m17n.org \
--cc=zsh-workers@sunsite.auc.dk \
/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).