zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
Cc: zsh workers <zsh-workers@zsh.org>
Subject: Re: PATCH Re: squeeze-slashes false not working?
Date: Sat, 14 May 2011 20:45:46 +0200	[thread overview]
Message-ID: <BANLkTinSk_0LC34u5+6d2eLVdehf04LpmA@mail.gmail.com> (raw)
In-Reply-To: <BANLkTi=c-dxpE5Dtm-SAEFE8YJRaguc+Tw@mail.gmail.com>

On 14 May 2011 20:31, Mikael Magnusson <mikachu@gmail.com> wrote:
> This seems to work great in my zsh -f. My next project is working out
> why none of this helps with my zshrc loaded :). Thanks.

Okay, lucky for me it was the third zstyle from the top,
zstyle ':completion:*' accept-exact-dirs 'yes'

I do still want this set, but maybe it can be made not to consider the
empty string an exact dir?
This seems to do it, but I've no idea if it's sane. Sane is a strange
word to use in _path_files though.

--- a/Completion/Unix/Type/_path_files
+++ b/Completion/Unix/Type/_path_files
@@ -361,7 +361,8 @@ for prepath in "$prepaths[@]"; do
   skipped=
   cpre=

-  if [[ ( -n $accept_exact_dirs || -z $path_completion ) && \
+  if [[ ( ( -n $accept_exact_dirs && ${pre} != /* ) || \
+          -z $path_completion ) && \
         ${pre} = (#b)(*)/([^/]#) ]]; then
     # We've been told either that we can accept an exact directory prefix
     # immediately, or that path expansion is inhibited.  Try the longest

-- 
Mikael Magnusson


  reply	other threads:[~2011-05-14 18:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-12 17:18 Mikael Magnusson
2011-05-13 18:17 ` Peter Stephenson
2011-05-13 18:23   ` Mikael Magnusson
2011-05-13 18:53     ` Peter Stephenson
2011-05-13 20:07       ` Mikael Magnusson
2011-05-14  5:58         ` PATCH " Bart Schaefer
2011-05-14 18:31           ` Mikael Magnusson
2011-05-14 18:45             ` Mikael Magnusson [this message]
2011-05-15  1:38               ` Bart Schaefer
2011-05-15 10:12                 ` Mikael Magnusson
2011-05-15 18:15                   ` Bart Schaefer
2011-05-15 18:20                     ` Mikael Magnusson
2011-05-15  1:39             ` Bart Schaefer
2011-05-15  9:48               ` Mikael Magnusson
2011-05-15 10:01                 ` 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=BANLkTinSk_0LC34u5+6d2eLVdehf04LpmA@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).