From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: Re: bug in directory completion with tilde expansion?
Date: Tue, 13 Feb 2001 10:21:53 +0100 (MET) [thread overview]
Message-ID: <200102130921.KAA12166@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Adam Spiers's message of Mon, 12 Feb 2001 20:41:47 +0000
Adam Spiers wrote:
> My funny combination of option settings strike again ...
>
> This time the culprit seems to be glob_complete:
>
> $ zsh -f
> $ echo $ZSH_VERSION
> 3.1.9-dev-8
> $ autoload compinit; compinit
> $ ls ~/soft<TAB>
> $ ls ~/software/ <-- OK, trailing slash
> $ setopt glob_complete
> $ ls ~/soft<TAB>
> $ ls ~/software <-- broken, no trailing slash
>
> The problem only exists for completion of tilde-prefixed paths.
Yes, that made it think the string was a pattern...
Bye
Sven
Index: Completion/Core/_path_files
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/_path_files,v
retrieving revision 1.35
diff -u -r1.35 _path_files
--- Completion/Core/_path_files 2000/11/08 09:20:43 1.35
+++ Completion/Core/_path_files 2001/02/13 09:20:46
@@ -622,7 +622,7 @@
compquote tmp4 tmp1
fi
if [[ -z "$_comp_correct" && -n "$compstate[pattern_match]" &&
- "$PREFIX$SUFFIX" = (|*[^\\])[][*?#~^\|\<\>]* ]]; then
+ "${PREFIX#\~}$SUFFIX" = (|*[^\\])[][*?#~^\|\<\>]* ]]; then
compadd -Qf -W "$prepath$realpath" "$pfxsfx[@]" "$mopts[@]" \
-M "r:|/=* r:|=*" - "$linepath$tmp4${(@)^tmp1}"
else
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
reply other threads:[~2001-02-13 9:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200102130921.KAA12166@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.dk \
/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).