* zsh 4.3.8 regression: buggy completion
@ 2008-10-29 19:10 Vincent Lefevre
2008-10-29 22:55 ` Peter Stephenson
0 siblings, 1 reply; 3+ messages in thread
From: Vincent Lefevre @ 2008-10-29 19:10 UTC (permalink / raw)
To: zsh-workers
With zsh 4.3.8, I can no longer complete using the the first
characters of each directory, e.g. "cd /u/lo/li[TAB]" for
/usr/local/lib. AFAIK, the pre-release didn't have this problem.
--
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: zsh 4.3.8 regression: buggy completion
2008-10-29 19:10 zsh 4.3.8 regression: buggy completion Vincent Lefevre
@ 2008-10-29 22:55 ` Peter Stephenson
2008-10-29 23:23 ` Vincent Lefevre
0 siblings, 1 reply; 3+ messages in thread
From: Peter Stephenson @ 2008-10-29 22:55 UTC (permalink / raw)
To: zsh-workers
On Wed, 29 Oct 2008 20:10:14 +0100
Vincent Lefevre <vincent@vinc17.org> wrote:
> With zsh 4.3.8, I can no longer complete using the the first
> characters of each directory, e.g. "cd /u/lo/li[TAB]" for
> /usr/local/lib. AFAIK, the pre-release didn't have this problem.
Thanks for noticing.
I can get this with zsh -f plus compinit, but for some reason not with
my usual options. (Hence my comment about the pinball rolling down
_path_files different ways.) Comparing with previous versions shows
there's a matcher option missing from compadd when -U is not also
present. (We shouldn't have had to remove the matcher when -U is
present, it just prevented me having to fix the internal completion
code.)
Please confirm this fixes it and I'll make 4.3.9.
Index: Completion/Unix/Type/_path_files
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_path_files,v
retrieving revision 1.38
diff -u -r1.38 _path_files
--- Completion/Unix/Type/_path_files 28 Oct 2008 22:23:05 -0000 1.38
+++ Completion/Unix/Type/_path_files 29 Oct 2008 21:51:33 -0000
@@ -9,7 +9,7 @@
local nm=$compstate[nmatches] menu matcher mopts sort mid accex fake
local listfiles listopts tmpdisp origtmp1 Uopt
integer npathcheck
-local -a match mbegin mend
+local -a match mbegin mend Mopts
typeset -U prepaths exppaths
@@ -209,7 +209,12 @@
[[ $compstate[insert] = (*menu|[0-9]*) || -n "$_comp_correct" ||
( -n "$compstate[pattern_match]" &&
"${orig#\~}" != (|*[^\\])[][*?#~^\|\<\>]* ) ]] && menu=yes
-[[ -n "$_comp_correct" ]] && cfopt=- Uopt=-U
+if [[ -n "$_comp_correct" ]]; then
+ cfopt=-
+ Uopt=-U
+else
+ Mopts=(-M "r:|/=* r:|=*")
+fi
# Now let's have a closer look at the string to complete.
@@ -616,7 +621,7 @@
-p "${Uopt:+$IPREFIX}$linepath$tmp2" \
-s "/${tmp3#*/}${Uopt:+$ISUFFIX}" \
-W "$prepath$realpath$testpath" \
- "$pfxsfx[@]" \
+ "$pfxsfx[@]" $Mopts \
$listopts \
-a tmp1
else
@@ -627,7 +632,7 @@
-p "${Uopt:+$IPREFIX}$linepath$tmp2" \
-s "${Uopt:+$ISUFFIX}" \
-W "$prepath$realpath$testpath" \
- "$pfxsfx[@]" \
+ "$pfxsfx[@]" $Mopts \
$listopts \
-a tmp1
fi
@@ -636,7 +641,7 @@
compadd $Uopt -Qf "$mopts[@]" -p "${Uopt:+$IPREFIX}$linepath$tmp2" \
-s "${Uopt:+$ISUFFIX}" \
-W "$prepath$realpath$testpath" \
- "$pfxsfx[@]" \
+ "$pfxsfx[@]" $Mopts \
$listopts \
-a tmp1
fi
@@ -646,7 +651,7 @@
tmp4=( $Uopt -Qf "$mopts[@]" -p "${Uopt:+$IPREFIX}$linepath$tmp2"
-s "${Uopt:+$ISUFFIX}"
-W "$prepath$realpath$testpath"
- "$pfxsfx[@]" )
+ "$pfxsfx[@]" $Mopts )
if [[ -z "$listsfx" ]]; then
for i in "$tmp1[@]"; do
tmpdisp=("${i%%/*}")
@@ -666,7 +671,7 @@
compadd $Uopt -Qf "$mopts[@]" -p "${Uopt:+$IPREFIX}$linepath$tmp2" \
-s "${Uopt:+$ISUFFIX}" \
-W "$prepath$realpath$testpath" \
- "$pfxsfx[@]" \
+ "$pfxsfx[@]" $Mopts \
$listopts \
-a tmp1
fi
@@ -735,7 +740,7 @@
compadd $Uopt -Qf "$mopts[@]" -p "${Uopt:+$IPREFIX}$linepath$tmp3/" \
-s "/$tmp4$i${Uopt:+$ISUFFIX}" \
-W "$prepath$realpath${mid%/*/}/" \
- "$pfxsfx[@]" $listopts - "$tmp2"
+ "$pfxsfx[@]" $Mopts $listopts - "$tmp2"
done
else
if [[ "$osuf" = */* ]]; then
@@ -766,7 +771,7 @@
compadd $Uopt -Qf -p "${Uopt:+$IPREFIX}$linepath$tmp4" \
-s "${Uopt:+$ISUFFIX}" \
-W "$prepath$realpath$testpath" \
- "$pfxsfx[@]" "$mopts[@]" $listopts -a tmp1
+ "$pfxsfx[@]" "$mopts[@]" $Mopts $listopts -a tmp1
fi
fi
fi
--
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: zsh 4.3.8 regression: buggy completion
2008-10-29 22:55 ` Peter Stephenson
@ 2008-10-29 23:23 ` Vincent Lefevre
0 siblings, 0 replies; 3+ messages in thread
From: Vincent Lefevre @ 2008-10-29 23:23 UTC (permalink / raw)
To: zsh-workers
On 2008-10-29 22:55:55 +0000, Peter Stephenson wrote:
> Please confirm this fixes it and I'll make 4.3.9.
This fixes the problem. Thanks.
--
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-10-29 23:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-29 19:10 zsh 4.3.8 regression: buggy completion Vincent Lefevre
2008-10-29 22:55 ` Peter Stephenson
2008-10-29 23:23 ` Vincent Lefevre
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).