summary refs log tree commit diff
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@zsh.org>2022-04-19 22:44:30 -0700
committerBart Schaefer <schaefer@zsh.org>2022-04-19 22:44:30 -0700
commita270da2adacb10a96cbfa0f4ede06b9282af213c (patch)
tree726615b5db6fbcefe8966f417ad326ee14ca4aa5
parentaf634c3acdb81c49804abec51a2312dc20654de8 (diff)
downloadzsh-a270da2adacb10a96cbfa0f4ede06b9282af213c.tar.gz
zsh-a270da2adacb10a96cbfa0f4ede06b9282af213c.tar.xz
zsh-a270da2adacb10a96cbfa0f4ede06b9282af213c.zip
unposted (cf. users/27656 (Tomasz Pala), users/27660): fix $SUFFIX when GLOB_COMPLETE
-rw-r--r--ChangeLog7
-rw-r--r--Completion/Unix/Type/_path_files2
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 929cdec82..e090f83a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
-2022-04-14  Bart Schaefer  <schaefer@Macadamia>
+2022-04-19  Bart Schaefer  <schaefer@zsh.org>
+
+	* unposted (cf. users/27656 (Tomasz Pala), users/27660):
+	Completion/Unix/Type/_path_files: fix $SUFFIX when GLOB_COMPLETE
+
+2022-04-14  Bart Schaefer  <schaefer@zsh.org>
 
 	* 50069: Test/C03traps.ztst: fix test description
 
diff --git a/Completion/Unix/Type/_path_files b/Completion/Unix/Type/_path_files
index 06d9d8d51..d46dcbe5a 100644
--- a/Completion/Unix/Type/_path_files
+++ b/Completion/Unix/Type/_path_files
@@ -734,7 +734,7 @@ for prepath in "$prepaths[@]"; do
 	      compadd "$tmp4[@]" -s "${Uopt:+$ISUFFIX}" $listopts - "$tmpdisp"
 	    done
           else
-            [[ -n "$compstate[pattern_match]" ]] && SUFFIX="${SUFFIX:s./.*/}*"
+            [[ -n "$compstate[pattern_match]" ]] && SUFFIX="${SUFFIX:gs./.*/}*"
 
             for i in "$tmp1[@]"; do
 	      _list_files i "$prepath$realpath$testpath"