From 032b6bd0b7c90e3bed9fbd7771ea1b6969b4c24f Mon Sep 17 00:00:00 2001 From: Marlon Richert Date: Tue, 6 Apr 2021 14:29:26 +0300 Subject: [PATCH] Fix _expand completion test --- Test/Y01completion.ztst | 3 +-- Test/comptest | 11 ++++++----- 2 files changed, 7 insertions(+), 7 deletions(-) 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=" "fi=" "di=" "ln=" "pi=" "so=" "bd=" "cd=" "ex=" "mi=" "tc=" "sp=" "lc=" "ec=\n" "rc=" zstyle ":completion:*" group-name "" zstyle ":completion:*:messages" format "%d @@ -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 "" - zle expand-or-complete +complete-word-with-report () { + print -lr "" + zle complete-word print -lr - "$LBUFFER" "$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 -- 2.31.0