zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: A couple of completion problems
Date: Fri, 4 Feb 2000 12:50:24 +0100 (MET)	[thread overview]
Message-ID: <200002041150.MAA24200@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Oliver Kiddle's message of Fri, 04 Feb 2000 11:18:33 +0000


Oliver Kiddle wrote:

> Sven Wischnowsky wrote:
> 
> > So, what do you all think: should we make all automatically found
> > options take their argument as being optional? Should we leave it to
> > the calling functions? Or should we add a style that can be used to
> > give a set of patterns and all options with matching names have their
> > argument turned into an optional one?
> 
> So how would _arguments behave differently if the argument to the long
> option is optional? My thinking is that the behaviour should be the same
> anyway:
> 
> command --foo<tab>   should insert an '=' which is auto-removed by a
> further space
> command --foo=<tab>  should complete the arguments to the foo option
> command --foo <tab>  the space (and lack of '=') surely means that we
> have moved on from the foo option and should be completing other
> options. If the argument to --foo is mandatory, then that's the user's
> problem for not specifying it. By continuing to try to complete
> arguments to --foo, zsh is going to achieve nothing.
> 
> I've probably missed the point somewhere though.

For _arguments a -foo= option means: argument directly following in
the the same word or in the next word. So, in your third case the
difference between an optional and a non-optional argument is that the 
at `bar -foo <TAB>' you can or cannot complete names of other options.

In earlier versions the -foo= didn't accept the argument in the next
word but Tanaka noticed that GNU commands work that way, so it was
changed. Of course in the old version we would have got normal
arguments and options as possible completions in the third case.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


             reply	other threads:[~2000-02-04 11:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-04 11:50 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-02-04 10:55 Sven Wischnowsky
2000-02-04 11:18 ` Oliver Kiddle
2000-02-04  8:39 Oliver Kiddle

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=200002041150.MAA24200@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --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).