zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ibmth.df.unipi.it>
To: zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: Bad interaction between -iprefix and -string
Date: Thu, 11 Feb 1999 15:12:15 +0100	[thread overview]
Message-ID: <9902111412.AA35808@ibmth.df.unipi.it> (raw)

I'm gradually working through my compctl's; I'll try and make the
result, including autodefcomping of functions and rebinding of
completion widgets etc., available when it looks presentable.

This came out of my attempts to handle dd, but here's a simpler test.
The [[ ... ]] stuck on its own looks funny, but it relies on the side
effect on IPREFIX.

% defcomp stest
% which __stest
__stest () {
        if [[ -iprefix name= ]]
        then
                [[ -string , ]]
                complist -k '(yan tan tethera dick)'
        fi
}
% stest name=y<TAB>                # produces...
% stest name=yan                   # OK so far, add `,te' by hand...
% stest name=yan,te<TAB>           # produces...
% stest name=yan,tedick            # The te is being ignored, too.

I checked and the corresponding compctl:

% compctl -x 's[name=] n[-1,,],s[name=]' -k '(yan tan tethera dick)' -- stest

works OK.


While I'm here, another comment on compadd: it's a well-known fact
that it doesn't check whether what you are adding actually matches
what's on the command line.  Is it easy to get it to do the check
unless the -U option is given?  It would be a little neater than
having to call complist with -s for a list produced by $(...) if you
don't want to postprocess the list.  In fact, what effect does -U have
on compadd at the moment, given that the existing prefix is deleted
with or without it?

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


                 reply	other threads:[~1999-02-11 14:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=9902111412.AA35808@ibmth.df.unipi.it \
    --to=pws@ibmth.df.unipi.it \
    --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).