From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-users@sunsite.dk
Subject: Re: [zsh 4.0.1 bug] filename completion
Date: Tue, 26 Jun 2001 15:49:55 +0200 (MET DST) [thread overview]
Message-ID: <200106261349.PAA24169@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: <20010626153704.C20366@greux.loria.fr>
Vincent Lefevre wrote:
> On Tue, Jun 26, 2001 at 15:29:30 +0200, Sven Wischnowsky wrote:
> > In terms of sh/ksh/bash-compatibility, yes. But for zsh it will give
> > you the same unless you have shwordsplit set.
>
> It is currently unset, but I don't want to break my current functions
> if I change my mind in the future...
>
> I've just tried your solution and it doesn't work.
>
> greux:~> which c. <15:32:45
> c. () {
> setopt localoptions nocdablevars
> local CDPATH
> cd "$@"
> }
>
> and I have
>
> compdef c.=cd
> zstyle ':completion:*:*:c.:*' tag-order local-directories
>
> at the end of my .zshrc, but when I type "c. soft" and try to complete,
> nothing happens.
Ouch, right. I hadn't realised that it tries to complete parameters
even if only local-directories are selected.
As a quick fix, you can add a small completion function for `c.', like this:
c. () {
setopt localoptions nocdablevars
local CDPATH
cd "$@"
}
_c.() {
setopt localoptions nocdablevars
local CDPATH
_cd "$@"
}
compdef _c. c.
zstyle ':completion:*:*:c.:*' tag-order local-directories
Note that the compdef line changed.
Whoever wrote that code in _cd should probably start re-thinking it (and
I don't think it was me this time).
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next prev parent reply other threads:[~2001-06-26 13:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-25 23:01 Vincent Lefevre
2001-06-26 5:15 ` Bart Schaefer
2001-06-26 8:35 ` Andrej Borsenkow
2001-06-26 9:01 ` Sven Wischnowsky
2001-06-26 10:10 ` Vincent Lefevre
2001-06-26 10:28 ` Andrej Borsenkow
2001-06-26 11:06 ` Vincent Lefevre
2001-06-26 11:18 ` Sven Wischnowsky
2001-06-26 13:28 ` Vincent Lefevre
2001-06-26 13:29 ` Sven Wischnowsky
2001-06-26 13:37 ` Vincent Lefevre
2001-06-26 13:49 ` Sven Wischnowsky [this message]
2001-06-26 9:41 ` Vincent Lefevre
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=200106261349.PAA24169@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-users@sunsite.dk \
/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).