about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2009-02-28 07:11:31 +0000
committerBart Schaefer <barts@users.sourceforge.net>2009-02-28 07:11:31 +0000
commit027ce9a00134c1f9c272739042e7133ad792dec7 (patch)
tree1e5ccee8165faaaeab793b4dca9d0d844755d5ff
parenta85db682710c7435e1093844491b4caa35aee90e (diff)
downloadzsh-027ce9a00134c1f9c272739042e7133ad792dec7.tar.gz
zsh-027ce9a00134c1f9c272739042e7133ad792dec7.tar.xz
zsh-027ce9a00134c1f9c272739042e7133ad792dec7.zip
26609: _path_files: better (?) fix for globcomplete.
unposted: _pick_variant: explicit rather than implicit success return.
-rw-r--r--ChangeLog11
-rw-r--r--Completion/Base/Utility/_pick_variant2
-rw-r--r--Completion/Unix/Type/_path_files4
3 files changed, 13 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 4e00629cc..a56dfa036 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-02-27  Barton E. Schaefer  <schaefer@zsh.org>
+
+	* 26609: Completion/Unix/Type/_path_files: further / different fix
+	for doubled -s in path completion, which only might be correct in
+	all cases but is more correct for the original failed example.
+
+	* unposted: Completion/Base/Utility/_pick_variant: be consistent
+	about explicitly returning 0 or 1, just because.
+
 2009-02-27  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* 26622: Src/lex.c, Test/A01grammar.ztst: improve 26617 and add
@@ -11257,5 +11266,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.4583 $                         
+* $Revision: 1.4584 $                         
 *****************************************************
diff --git a/Completion/Base/Utility/_pick_variant b/Completion/Base/Utility/_pick_variant
index a80cddb26..01fa2b98f 100644
--- a/Completion/Base/Utility/_pick_variant
+++ b/Completion/Base/Utility/_pick_variant
@@ -25,7 +25,7 @@ for cmd pat in "$var[@]"; do
   if [[ $output = *$~pat* ]]; then
     (( $+opts[-r] )) && eval "${opts[-r]}=$cmd"
     _cmd_variant[$opts[-c]]="$cmd"
-    return
+    return 0
   fi
 done
 
diff --git a/Completion/Unix/Type/_path_files b/Completion/Unix/Type/_path_files
index 2ce2c0cb2..fceebec4c 100644
--- a/Completion/Unix/Type/_path_files
+++ b/Completion/Unix/Type/_path_files
@@ -670,9 +670,9 @@ for prepath in "$prepaths[@]"; do
 	         "$pfxsfx[@]" $Mopts )
 	  if [[ -z "$listsfx" ]]; then
             for i in "$tmp1[@]"; do
-	      tmpdisp=("${i%%/*}")
+	      tmpdisp=("$i")
 	      _list_files tmpdisp "$prepath$realpath$testpath"
-	      compadd "$tmp4[@]" -s "/${i#*/}${Uopt:+$ISUFFIX}" $listopts - "$tmpdisp"
+	      compadd "$tmp4[@]" -s "${Uopt:+$ISUFFIX}" $listopts - "$tmpdisp"
 	    done
           else
             [[ -n "$compstate[pattern_match]" ]] && SUFFIX="${SUFFIX:s./.*/}*"