1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-01 05:16:05 +01:00

48413: Fix _expand completion test

This commit is contained in:
Marlon Richert 2021-04-06 14:29:26 +03:00 committed by Oliver Kiddle
parent e3c4c80f3e
commit aaf619cc22
3 changed files with 10 additions and 7 deletions

View file

@ -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>

View file

@ -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 }{}

View file

@ -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