zsh-users
 help / color / mirror / code / Atom feed
From: Adam Spiers <adam@thelonious.new.ox.ac.uk>
To: zsh users mailing list <zsh-users@math.gatech.edu>
Subject: Re: Exporting arrays
Date: Tue, 13 Jan 1998 01:39:55 +0000	[thread overview]
Message-ID: <19980113013955.24269@thelonious.new.ox.ac.uk> (raw)
In-Reply-To: <82soqtgu71.fsf@cuckoo.infovav.se>; from Mirar on Tue, Jan 13, 1998 at 12:15:46AM +0100

Mirar (mirar@idonex.se) wrote:
> > Is that glob patterns also, or something else?  I ask, because I
> > can't get it working.  I want a condition like C[0,abcd????]
> 
> I got this line to work, at least:
> 
> compctl -k '(foobar)' -x C[-1,foo???] -k '(foo bar)' - -- foo 

That provided enough of a clue for me to realise what I was
doing wrong :-)

Essentially I wanted it to add a suffix if the prefix matched
foo???? but had forgotten that the prefix was counted as part of
the completion and so any valid completions would have to
begin with this prefix.  Hence I needed a dummy completion which
always completed successfully by adding an empty string, and
found one in -K compctl_dummy, where

compctl_dummy () {
              reply=($1)
}

Is there a better way of doing this?  Should there not be the
flexibility of choosing whether or not a specified string or
pattern to match is part of the completion?


  reply	other threads:[~1998-01-13  1:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-01-11 18:16 Adam Spiers
1998-01-12  3:51 ` Geoff Wing
1998-01-12  9:01 ` Peter Stephenson
1998-01-12 10:45 ` Andrew Main
1998-01-12 13:48   ` Bernd Eggink
1998-01-12 15:15     ` Andrew Main
1998-01-12 21:24       ` Bernd Eggink
1998-01-12 22:12       ` Adam Spiers
1998-01-12 23:15         ` Mirar
1998-01-13  1:39           ` Adam Spiers [this message]
1998-01-13 14:12             ` Mirar

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=19980113013955.24269@thelonious.new.ox.ac.uk \
    --to=adam@thelonious.new.ox.ac.uk \
    --cc=adam.spiers@new.ox.ac.uk \
    --cc=zsh-users@math.gatech.edu \
    /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).