Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Disable special-dirs for cdpath



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