zsh-users
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Danek Duvall <duvall@emufarm.org>
Cc: zsh-users@sunsite.dk
Subject: Re: Completion function for bitkeeper?
Date: Mon, 17 Nov 2003 16:47:40 +0100	[thread overview]
Message-ID: <15744.1069084060@gmcs3.local> (raw)
In-Reply-To: <20031114154608.GA6959@lorien.emufarm.org>

On 14 Nov, Danek Duvall wrote:
> 
> > Having $expl stuff added after the first word is exactly the behaviour
> > that is wanted in virtually 100% of all cases.
> 
> So let me ask, what am I doing wrong that makes me believe that I don't
> want it in my case?  Is there a conventional way of passing arguments to
> an action helper function and not getting them mixed up with arguments
> intended for compadd?  Is there functionality I'm missing because I'm
> not doing the conventional thing?

You're not doing something wrong so much as different. Firstly, the
most common case is that there are no options other than compadd
options to get mixed up with so having $expl added is what is wanted.

You wanted the compadd options after your own extra option because it
made it easier to find your option--it would always be the first one.
That made your helper function simpler but puts the onus on the calling
functions to get the options in the right order.

Normally, we put the onus on the helper function to sort out mixed up
options and we have zparseopts to make the job easy. That's better in
my opinion. If you found a Unix program which had two independent and
unrelated options -a and -b and the program couldn't cope with them
being specified in the order -b followed by -a, you wouldn't think it
was very good would you?

Does that make sense?

Oliver 


  parent reply	other threads:[~2003-11-17 15:44 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-23 16:00 Steve Borho
2003-05-23 16:01 ` Danek Duvall
2003-11-06 15:32   ` Danek Duvall
2003-11-07 19:17     ` Oliver Kiddle
2003-11-10 18:20       ` Danek Duvall
2003-11-11  8:22         ` Oliver Kiddle
2003-11-11 10:42           ` Peter Stephenson
2003-11-11 15:21             ` Oliver Kiddle
2003-11-11 15:24               ` Peter Stephenson
2003-11-11 16:13                 ` Oliver Kiddle
2003-11-11 16:23                   ` Peter Stephenson
2003-11-11 16:44                     ` Oliver Kiddle
2003-11-11 16:23           ` Danek Duvall
2003-11-11 19:06             ` Oliver Kiddle
2003-11-11 21:28               ` Danek Duvall
2003-11-14  8:04                 ` Oliver Kiddle
2003-11-14 10:47                   ` Peter Stephenson
2003-11-14 13:09                     ` Oliver Kiddle
2003-11-14 16:12                       ` Bart Schaefer
2003-11-14 16:23                         ` Peter Stephenson
2003-11-14 17:14                           ` Bart Schaefer
2003-11-14 17:01                         ` Oliver Kiddle
2003-11-14 15:46                   ` Danek Duvall
2003-11-14 21:24                     ` Danek Duvall
2003-11-17 15:47                     ` Oliver Kiddle [this message]
2003-11-17 17:51                       ` Danek Duvall
2003-11-19 10:23                         ` 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=15744.1069084060@gmcs3.local \
    --to=okiddle@yahoo.co.uk \
    --cc=duvall@emufarm.org \
    --cc=zsh-users@sunsite.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).