zsh-users
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@brasslantern.com>
To: 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 09:07:30 -0700	[thread overview]
Message-ID: <980617090730.ZM15226@candle.brasslantern.com> (raw)
In-Reply-To: <9806171510.AA08785@ezdzit.zko.dec.com>

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

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

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

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

The above will complete to produce command lines like

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

That is, always requiring "co co[123]" and "construct cons[12]" to be
paired, but allowing the pairs of them to appear anywhere and to be
interspersed with "ci" and "cinema".

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


  parent reply	other threads:[~1998-06-17 16:12 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 [this message]
1998-06-17 16:33   ` Paul Lew
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=980617090730.ZM15226@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=lew@ezdzit.zko.dec.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).