zsh-users
 help / color / mirror / code / Atom feed
From: Paul Lew <lew@ezdzit.zko.dec.com>
To: "Bart Schaefer" <schaefer@brasslantern.com>
Cc: Paul Lew <lew@ezdzit.zko.dec.com>, zsh-users@math.gatech.edu
Subject: Re: compctl tips needed on words with common prefix
Date: Wed, 17 Jun 1998 12:33:28 -0400	[thread overview]
Message-ID: <9806171633.AA09038@ezdzit.zko.dec.com> (raw)
In-Reply-To: <980617090730.ZM15226@candle.brasslantern.com>

>>>>> "Bart" == Bart Schaefer <schaefer@brasslantern.com> writes:

    Bart> On Jun 17, 11:10am, Paul Lew wrote:
    Bart> } Subject: compctl tips needed on words with common prefix
    Bart> }
    Bart> } 	compctl -k "(ci co construct cinema)" \
    Bart> } 		-x "r[co,;]" -k "(co1 co2 co3)" \
    Bart> } 		- "r[construct,;]" -k "(cons1 cons2)" -- xxx 
    Bart> } 
    Bart> } I could not get 'construct' to be completed by <TAB>
    Bart> } because the 'co' is recognized first

    Bart> The problem is with the "r[co,;]" -- that's what is spotting
    Bart> the "co" and insisting that only 1 2 or 3 may follow it.

    Bart> What you mean to say, I think, is that any of (co1 co2 co3)
    Bart> may appear *after* "co ".  Right?  In that case, what you
    Bart> want is "c[-1,co]":

    Bart> compctl -k "(ci co construct cinema)" \
    Bart> -x "c[-1,co]" -k "(co1 co2 co3)" \
    Bart> - "c[-1,construct]" -k "(cons1 cons2)" -- xxx 

    Bart> The above will complete to produce command lines like

    Bart> xxx co co2 construct cons1 cinema
    Bart> xxx construct cons2 cinema co co1
    Bart> xxx co co2 ci construct cons1 cinema co co1

That works.  But my situation is a little different, what I would like
is to have "co1 co2 co3" be part of the completion words as long as
there is a word "co" in front, i.e.,

      xxx co co1 co2	       or
      xxx co co3 co1 co2

Do c[offset,string] require a fixed offset or can be a range?  Use -1
as offset will only work for the 1st word.  Also, I still want to be
able to complete the 'construct'.  Any option left?  Thanks...


  reply	other threads:[~1998-06-17 16:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-06-17 15:10 Paul Lew
1998-06-17 15:34 ` Zefram
1998-06-17 16:17   ` Paul Lew
1998-06-17 16:07 ` Bart Schaefer
1998-06-17 16:33   ` Paul Lew [this message]
1998-06-17 18:27     ` Bart Schaefer
1998-06-18  2:58       ` Paul Lew

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=9806171633.AA09038@ezdzit.zko.dec.com \
    --to=lew@ezdzit.zko.dec.com \
    --cc=schaefer@brasslantern.com \
    --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).