Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Completion on cd
- X-seq: zsh-workers 3758
- From: Peter Stephenson <pws@xxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Re: Completion on cd
- Date: Mon, 02 Feb 1998 10:12:00 +0100
- In-reply-to: "Oliver Kiddle"'s message of "Sun, 01 Feb 1998 15:52:32 MET." <swordfish.886348813@xxxxxxxxxxxxxxxxxxxxx>
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 <completion options here>
bindkey "<key sequence>" 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 <pws@xxxxxx> Tel: +39 50 911239
WWW: http://www.ifh.de/~pws/
Gruppo Teorico, Dipartimento di Fisica
Piazza Torricelli 2, 56100 Pisa, Italy
Messages sorted by:
Reverse Date,
Date,
Thread,
Author