Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: globcomplete desctroys file completion
- X-seq: zsh-workers 26606
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: globcomplete desctroys file completion
- Date: Wed, 25 Feb 2009 20:48:44 +0000
- In-reply-to: <20090225203949.5e203b85@pws-pc>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <slrngq038s.2hh.joerg@xxxxxxxxxxxx> <090221111624.ZM12907@xxxxxxxxxxxxxxxxxxxxxx> <090221165745.ZM13030@xxxxxxxxxxxxxxxxxxxxxx> <20090225203949.5e203b85@pws-pc>
On Wed, 25 Feb 2009 20:39:49 +0000
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> wrote:
> Indeed, comparing with the code in 4.2 (before the $Uopt stuff was added)
> suggests it should probably be something like the following anyway,
> though I don't have the set-up to test whether it helps here.
Scratch that, it's simpler---we never want two -s's, we just want to
ensure $ISUFFIX is there when needed. This time I do have some evidence
this is doing better things with GLOBCOMPLETE set than previously.
Index: Completion/Unix/Type/_path_files
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_path_files,v
retrieving revision 1.42
diff -u -r1.42 _path_files
--- Completion/Unix/Type/_path_files 29 Jan 2009 17:58:30 -0000 1.42
+++ Completion/Unix/Type/_path_files 25 Feb 2009 20:46:01 -0000
@@ -666,14 +666,13 @@
# We are inserting the match into the command line.
if [[ "$tmp3" = */* ]]; then
tmp4=( $Uopt -Qf "$mopts[@]" -p "${Uopt:+$IPREFIX}$linepath$tmp2"
- -s "${Uopt:+$ISUFFIX}"
-W "$prepath$realpath$testpath"
"$pfxsfx[@]" $Mopts )
if [[ -z "$listsfx" ]]; then
for i in "$tmp1[@]"; do
tmpdisp=("${i%%/*}")
_list_files tmpdisp "$prepath$realpath$testpath"
- compadd "$tmp4[@]" -s "/${i#*/}" $listopts - "$tmpdisp"
+ compadd "$tmp4[@]" -s "/${i#*/}${Uopt:+$ISUFFIX}" $listopts - "$tmpdisp"
done
else
[[ -n "$compstate[pattern_match]" ]] && SUFFIX="${SUFFIX:s./.*/}*"
--
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author