Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Disable special-dirs for cdpath
- X-seq: zsh-workers 29817
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: Disable special-dirs for cdpath
- Date: Sat, 8 Oct 2011 12:58:26 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=hCbqnditzLv7hbTSKa1Ei9ir7DiAhsuYX9Ftq819iVs=; b=ujyTwje0Vhbh7yYQAlm0P0/OP54r+uL3te1b8nvcVb0bZdlDfogwUEB3a7DzkOsstJ g8k2fWlOTqwlUluxQWHlgOwfOUBSCyIbhC8glsSsn7tpf1PVd8PSUflAOSlI1xkJCCV4 AT6kyMzwFY3n2sXyqlTt74vx+6EoPZ6nUxfK8=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hi,
% .<tab>
---- local directory
../ .git/
---- directory in cdpath
../
This annoyed me a bit, and it doesn't seem possible to use
'path-directories' in the look up for the special-dirs style, it
always uses "paths" as the tag. I came up with this, but it hardly
seems like the right way to do it,
--- a/Completion/Unix/Type/_path_files
+++ b/Completion/Unix/Type/_path_files
@@ -180,7 +180,8 @@ else
skips='((.|..)/)##'
fi
-zstyle -s ":completion:${curcontext}:paths" special-dirs sdirs
+zstyle -s ":completion:${curcontext}:${mopts[$((1+${mopts[(i)-J]}))]}"
special-dirs sdirs || \
+ zstyle -s ":completion:${curcontext}:paths" special-dirs sdirs
zstyle -t ":completion:${curcontext}:paths" list-suffixes &&
listsfx=yes
Any other ideas? Is the "real" tag already accessible here in some
other parameter?
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author