* PATCH: Re: bug in directory completion with tilde expansion?
@ 2001-02-13 9:21 Sven Wischnowsky
0 siblings, 0 replies; only message in thread
From: Sven Wischnowsky @ 2001-02-13 9:21 UTC (permalink / raw)
To: zsh-workers
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-02-13 9:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-13 9:21 PATCH: Re: bug in directory completion with tilde expansion? Sven Wischnowsky
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).