zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Disable special-dirs for cdpath
Date: Sat, 8 Oct 2011 12:58:26 +0200	[thread overview]
Message-ID: <CAHYJk3Q9QPxR8CYAC1wwgVPVEiL4i9a5MFSzxVdACF1xRC70BA@mail.gmail.com> (raw)

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


             reply	other threads:[~2011-10-08 10:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-08 10:58 Mikael Magnusson [this message]
2011-10-09 17:40 ` Peter Stephenson
2011-10-09 17:52   ` Mikael Magnusson

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=CAHYJk3Q9QPxR8CYAC1wwgVPVEiL4i9a5MFSzxVdACF1xRC70BA@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=zsh-workers@zsh.org \
    /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).