zsh-workers
 help / color / mirror / code / Atom feed
* Disable special-dirs for cdpath
@ 2011-10-08 10:58 Mikael Magnusson
  2011-10-09 17:40 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Mikael Magnusson @ 2011-10-08 10:58 UTC (permalink / raw)
  To: zsh workers

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-09 17:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-08 10:58 Disable special-dirs for cdpath Mikael Magnusson
2011-10-09 17:40 ` Peter Stephenson
2011-10-09 17:52   ` Mikael Magnusson

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).