about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMarlon Richert <marlon.richert@gmail.com>2021-04-06 14:29:26 +0300
committerOliver Kiddle <opk@zsh.org>2021-04-06 13:59:43 +0200
commitaaf619cc22b0c2bf431be9c3d1d13d90585a17d3 (patch)
tree89ceebb933f23ab450075eec25f525be71ff547c
parente3c4c80f3ece4e28b4b29303f80efec861087ac4 (diff)
downloadzsh-aaf619cc22b0c2bf431be9c3d1d13d90585a17d3.tar.gz
zsh-aaf619cc22b0c2bf431be9c3d1d13d90585a17d3.tar.xz
zsh-aaf619cc22b0c2bf431be9c3d1d13d90585a17d3.zip
48413: Fix _expand completion test
-rw-r--r--ChangeLog3
-rw-r--r--Test/Y01completion.ztst3
-rw-r--r--Test/comptest11
3 files changed, 10 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index f41f2699b..62d736cb2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2021-04-06  Oliver Kiddle  <opk@zsh.org>
 
+	* Marlon Richert: 48413: Test/comptest, Test/Y01completion.ztst:
+	Fix _expand completion test
+
 	* unposted: Etc/BUGS: add several references to old list posts
 
 2021-04-05  Daniel Shahaf  <d.s@daniel.shahaf.name>
diff --git a/Test/Y01completion.ztst b/Test/Y01completion.ztst
index eff6910c2..858fa7220 100644
--- a/Test/Y01completion.ztst
+++ b/Test/Y01completion.ztst
@@ -44,7 +44,7 @@
 >line: {: dir1/}{}
 >line: {: dir2/}{}
 
-  comptest $': *\t\t\t\t\t\t\t'
+  comptest $': *\t\t\t\t\t\t'
 0:_expand shows file types
 >line: {: dir1/}{}
 >DESCRIPTION:{expansions}
@@ -56,7 +56,6 @@
 >NO:{dir1 dir2 file1 file2}
 >DESCRIPTION:{original}
 >NO:{*}
->line: {: dir1/}{}
 >line: {: dir2/}{}
 >line: {: file1 }{}
 >line: {: file2 }{}
diff --git a/Test/comptest b/Test/comptest
index a36e301e0..79c69979a 100644
--- a/Test/comptest
+++ b/Test/comptest
@@ -40,6 +40,7 @@ KEYTIMEOUT=1
 setopt zle
 autoload -U compinit
 compinit -u
+zstyle ":completion:*" completer _expand _complete _ignored
 zstyle ":completion:*:default" list-colors "no=<NO>" "fi=<FI>" "di=<DI>" "ln=<LN>" "pi=<PI>" "so=<SO>" "bd=<BD>" "cd=<CD>" "ex=<EX>" "mi=<MI>" "tc=<TC>" "sp=<SP>" "lc=<LC>" "ec=<EC>\n" "rc=<RC>"
 zstyle ":completion:*" group-name ""
 zstyle ":completion:*:messages" format "<MESSAGE>%d</MESSAGE>
@@ -50,9 +51,9 @@ zstyle ":completion:*:options" verbose yes
 zstyle ":completion:*:values" verbose yes
 setopt noalwayslastprompt listrowsfirst completeinword
 zmodload zsh/complist
-expand-or-complete-with-report () {
-  print -lr "<WIDGET><expand-or-complete>"
-  zle expand-or-complete
+complete-word-with-report () {
+  print -lr "<WIDGET><complete-word>"
+  zle complete-word
   print -lr - "<LBUFFER>$LBUFFER</LBUFFER>" "<RBUFFER>$RBUFFER</RBUFFER>"
   zle clear-screen
   zle -R
@@ -80,11 +81,11 @@ zle-finish () {
   (( $+mark )) && print -lr "MARK: $mark"
   zle accept-line
 }
-zle -N expand-or-complete-with-report
+zle -N complete-word-with-report
 zle -N list-choices-with-report
 zle -N comp-finish
 zle -N zle-finish
-bindkey "^I" expand-or-complete-with-report
+bindkey "^I" complete-word-with-report
 bindkey "^D" list-choices-with-report
 bindkey "^Z" comp-finish
 bindkey "^X" zle-finish