Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH Re: squeeze-slashes false not working?
- X-seq: zsh-workers 29291
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- Subject: Re: PATCH Re: squeeze-slashes false not working?
- Date: Sat, 14 May 2011 20:45:46 +0200
- Cc: zsh workers <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:cc:content-type; bh=NKJEVdAWQWy1vsexv1S3wh7rL5xPnjO9h3g2Dg7tH9I=; b=BSwV1VzBjqsRSE1ci4XazTIzJL7ew1edMG7il//pJ7IfQObSUaxbUU6Laaos5V0Y9M ZQrWprqQYXUNWfC11kvFWsWxejIs4Qe6itqE4nkeCBpVl9TUZqMGxYzgnujTzqFmTGvK fSfg2y603521nW33HWxgk+WUPHFjkertNFXUQ=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; b=g+f2FyD7sv7LJopHIwrU9F7zQEi8vec8PZ6Jb9NVDmid4ANgWnKkcqF5+pTAbmX1SN xNX9S1coHmPcCI9YJglNJB2ZsbgblGBdSgYGp1wqdfiqQ5ddZWVgCFT8BJA/XTuQo5y8 1FLc4nd8sqg6aVNQzKoVHVwx/MBaGf2zSZagE=
- In-reply-to: <BANLkTi=c-dxpE5Dtm-SAEFE8YJRaguc+Tw@mail.gmail.com>
- 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
- References: <BANLkTikqnR3pJk8FzRT6Qo9J+wTMGSnycQ@mail.gmail.com> <20110513191710.657d2f61@pws-pc.ntlworld.com> <BANLkTi=KyDfiM1YqXR0q1w-PxiAeQ0thdQ@mail.gmail.com> <20110513195324.6ab90eb2@pws-pc.ntlworld.com> <BANLkTi=7vnGkz2uPTyd3Br019SuxV5_Q2Q@mail.gmail.com> <110513225805.ZM13712@torch.brasslantern.com> <BANLkTi=c-dxpE5Dtm-SAEFE8YJRaguc+Tw@mail.gmail.com>
On 14 May 2011 20:31, Mikael Magnusson <mikachu@xxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author