From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org
Subject: Re: Patch (?) for _path_files
Date: Sun, 8 May 2011 18:37:11 +0100 [thread overview]
Message-ID: <20110508183711.01106e3e@pws-pc.ntlworld.com> (raw)
In-Reply-To: <110506080555.ZM21390@torch.brasslantern.com>
On Fri, 06 May 2011 08:05:55 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:
> I believe this has to do with the thread "Re: Another _path_files bug?"
> from the first couple of weeks of February 2011.
>
> --- ../zsh-forge/current/Completion/Unix/Type/_path_files 2011-02-13 10:44
> :16 -0800
> +++ ./Completion/Unix/Type/_path_files 2011-02-13 10:51:33 -0800
> @@ -751,10 +751,11 @@
> [[ "$tsuf" != /* ]] && mid="$testpath"
> if [[ -z "$_comp_correct" && -n "$compstate[pattern_match]" &&
> "$tmp2" = (|*[^\\])[][*?#~^\|\<\>]* ]]; then
> - cpre="${cpre}${tmp1[1]%%/*}/"
> + cpre="${cpre}${tmp1[1]%%/*}"
> else
> - cpre="${cpre}${tpre}/"
> + cpre="${cpre}${tpre}"
> fi
> + [[ "$tsuf" = /* ]] && cpre+=/
> tpre="${tsuf#*/}"
> tsuf=
> else
>
> I backed out most of my scratch work from that thread when PWS posted
> workers/28750, but kept this bit -- for reasons that sadly I now no
> longer remember. It avoids appending a slash to the common prefix (if
> I recall correctly what cpre means, which I may not) unless there was
> a leading slash on the tested suffix (again IIRC tsuf). I suspect
> this was meant to prevent double slash appearing in some completions.
>
> Any opinions on whether this is correct/useful?
Unless we find it out case it affects, I don't think we can tell.
--
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
prev parent reply other threads:[~2011-05-08 18:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-06 15:05 Bart Schaefer
2011-05-08 17:37 ` Peter Stephenson [this message]
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=20110508183711.01106e3e@pws-pc.ntlworld.com \
--to=p.w.stephenson@ntlworld.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).