From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19474 invoked from network); 2 Feb 1998 09:31:10 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 2 Feb 1998 09:31:10 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id EAA03328; Mon, 2 Feb 1998 04:10:20 -0500 (EST) Resent-Date: Mon, 2 Feb 1998 04:10:20 -0500 (EST) Message-Id: <199802020912.KAA05823@hydra.ifh.de> To: zsh-workers@math.gatech.edu (Zsh hackers list) Subject: Re: Completion on cd In-reply-to: "Oliver Kiddle"'s message of "Sun, 01 Feb 1998 15:52:32 MET." Date: Mon, 02 Feb 1998 10:12:00 +0100 From: Peter Stephenson Resent-Message-ID: <"4TwJj1.0.up.xrOrq"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3758 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Oliver Kiddle wrote: > > You would be probably better off by using -D flag. It allows you to > > override it on per-command/per-argument basis and still be applied in > > default case. In most cases it should be the same as you have, with > > exception that -/ will work :-) > > I don't think that the -D flag would be better. I would then have to > program the alternative '~' expansion in for every command. Also, the -T > flags operates when completing the command itself if I run a command in > a user's directory. Remember you can stick '+' at the end of a completion to use the default as a default. You could also try the patch I posted recently for binding specific completions (find it at http://www.peak.org/zsh/ , it's called something like 'completion widgets' and should apply cleanly to zsh-e.1.2-zefram3). Then you do zle -C alternative-tilde-expansion bindkey "" alternative-tilde-expansion and use the special key sequence. This is probably the only way of getting the level of control you want. > The following does not work as I would expect: > compctl -x 's[file:/]' -/g '*.html' -W '/' -- lynx Either you have different expectations or a different version of the shell from me. Try with zsh -f again. However, I don't understand where you're expecting the second / to come from, since -W will strip it --- it's for an implicit path, i.e. one which doesn't appear on the command line. I would simply omit the -W and type the second / by hand or use some other compctl option to get it inserted if you insist, or alternatively change the omitted prefix to 's[file://]'. In fact, you shouldn't need to do even that since of course '//users/...' is recognised as a path, and -W doesn't strip more than you've asked it to. -- Peter Stephenson Tel: +39 50 911239 WWW: http://www.ifh.de/~pws/ Gruppo Teorico, Dipartimento di Fisica Piazza Torricelli 2, 56100 Pisa, Italy