zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@u.genie.co.uk>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: Re: _netscape
Date: Tue, 23 May 2000 14:50:04 +0100	[thread overview]
Message-ID: <392A8C8C.4EBEF343@u.genie.co.uk> (raw)
In-Reply-To: <200005231315.PAA24546@beta.informatik.hu-berlin.de>

Sven Wischnowsky wrote:

> > > Basically, what a helper function needs to do is
> > > take the suffix passed to it and when it is completing a final component
> > > of itself, it should pass any suffix it wants with the one passed to it
> > > appended. Pulling out -S options from "$@" is going to look messy
> > > without some special handling at a lower level somewhere.

> This is so simple to write that I think it's worth adding. So, this
> adds the -E option to zparseopts that can be used to extract options
> from the positional parameters. When combined with -D, the options
> described are actually removed from $*.

On the basis that compadd does only use the first -S option that it is
passed, being able to remove an option is not what is wanted: what is
wanted is a way to separate the first -S option and have it available in
a parameter.

If a helper function is completing only an initial portion of whatever
it completes, it is likely that what it needs to do is use its own
suffix, ignoring any passed to it - this we can do by inserting a new -S
option before the passed args. But, if a helper function is completing
the final portion of whatever it completes, it might want to use as a
suffix, the concatenation of its own suffix with the one which was
passed to it. For this, it would need to extract any suffix passed to it
as opposed to remove it. I'll also need to think about what will happen
with -r options aswell. This -E option well be very useful as it is but
it is not quite what I meant by 'pull out -S options from "$@"'.

Oliver


  reply	other threads:[~2000-05-23 13:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-23 13:15 Sven Wischnowsky
2000-05-23 13:50 ` Oliver Kiddle [this message]
2000-05-23 14:43 ` zparseopts change (Re: PATCH: Re: _netscape) Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
2000-05-24  8:05 PATCH: Re: _netscape Sven Wischnowsky
2000-05-23 13:58 Sven Wischnowsky
2000-05-22  8:37 Sven Wischnowsky
2000-05-23 16:07 ` Oliver Kiddle
2000-05-18 11:02 Sven Wischnowsky
2000-05-19 18: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=392A8C8C.4EBEF343@u.genie.co.uk \
    --to=opk@u.genie.co.uk \
    --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).