zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ifh.de>
To: zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: Re: Completion on cd
Date: Mon, 02 Feb 1998 10:12:00 +0100	[thread overview]
Message-ID: <199802020912.KAA05823@hydra.ifh.de> (raw)
In-Reply-To: "Oliver Kiddle"'s message of "Sun, 01 Feb 1998 15:52:32 MET." <swordfish.886348813@student.cs.york.ac.uk>

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@ifh.de>       Tel: +39 50 911239
WWW:  http://www.ifh.de/~pws/
Gruppo Teorico, Dipartimento di Fisica
Piazza Torricelli 2, 56100 Pisa, Italy


  reply	other threads:[~1998-02-02  9:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-02-01 15:52 Oliver Kiddle
1998-02-02  9:12 ` Peter Stephenson [this message]
  -- strict thread matches above, loose matches on Subject: below --
1998-02-02 13:45 Oliver Kiddle
     [not found] <swordfish.886344199@student.cs.york.ac.uk>
1998-02-01 15:12 ` Andrej Borsenkow
     [not found] <199801280058.RAA25088@empire.Central.Sun.COM>
1998-01-28  8:54 ` Wessel Dankers

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=199802020912.KAA05823@hydra.ifh.de \
    --to=pws@ifh.de \
    --cc=zsh-workers@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).