mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-08-13 15:41:01 +02:00
48413: Fix _expand completion test
This commit is contained in:
parent
e3c4c80f3e
commit
aaf619cc22
3 changed files with 10 additions and 7 deletions
|
@ -1,5 +1,8 @@
|
||||||
2021-04-06 Oliver Kiddle <opk@zsh.org>
|
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
|
* unposted: Etc/BUGS: add several references to old list posts
|
||||||
|
|
||||||
2021-04-05 Daniel Shahaf <d.s@daniel.shahaf.name>
|
2021-04-05 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
>line: {: dir1/}{}
|
>line: {: dir1/}{}
|
||||||
>line: {: dir2/}{}
|
>line: {: dir2/}{}
|
||||||
|
|
||||||
comptest $': *\t\t\t\t\t\t\t'
|
comptest $': *\t\t\t\t\t\t'
|
||||||
0:_expand shows file types
|
0:_expand shows file types
|
||||||
>line: {: dir1/}{}
|
>line: {: dir1/}{}
|
||||||
>DESCRIPTION:{expansions}
|
>DESCRIPTION:{expansions}
|
||||||
|
@ -56,7 +56,6 @@
|
||||||
>NO:{dir1 dir2 file1 file2}
|
>NO:{dir1 dir2 file1 file2}
|
||||||
>DESCRIPTION:{original}
|
>DESCRIPTION:{original}
|
||||||
>NO:{*}
|
>NO:{*}
|
||||||
>line: {: dir1/}{}
|
|
||||||
>line: {: dir2/}{}
|
>line: {: dir2/}{}
|
||||||
>line: {: file1 }{}
|
>line: {: file1 }{}
|
||||||
>line: {: file2 }{}
|
>line: {: file2 }{}
|
||||||
|
|
|
@ -40,6 +40,7 @@ KEYTIMEOUT=1
|
||||||
setopt zle
|
setopt zle
|
||||||
autoload -U compinit
|
autoload -U compinit
|
||||||
compinit -u
|
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:*: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:*" group-name ""
|
||||||
zstyle ":completion:*:messages" format "<MESSAGE>%d</MESSAGE>
|
zstyle ":completion:*:messages" format "<MESSAGE>%d</MESSAGE>
|
||||||
|
@ -50,9 +51,9 @@ zstyle ":completion:*:options" verbose yes
|
||||||
zstyle ":completion:*:values" verbose yes
|
zstyle ":completion:*:values" verbose yes
|
||||||
setopt noalwayslastprompt listrowsfirst completeinword
|
setopt noalwayslastprompt listrowsfirst completeinword
|
||||||
zmodload zsh/complist
|
zmodload zsh/complist
|
||||||
expand-or-complete-with-report () {
|
complete-word-with-report () {
|
||||||
print -lr "<WIDGET><expand-or-complete>"
|
print -lr "<WIDGET><complete-word>"
|
||||||
zle expand-or-complete
|
zle complete-word
|
||||||
print -lr - "<LBUFFER>$LBUFFER</LBUFFER>" "<RBUFFER>$RBUFFER</RBUFFER>"
|
print -lr - "<LBUFFER>$LBUFFER</LBUFFER>" "<RBUFFER>$RBUFFER</RBUFFER>"
|
||||||
zle clear-screen
|
zle clear-screen
|
||||||
zle -R
|
zle -R
|
||||||
|
@ -80,11 +81,11 @@ zle-finish () {
|
||||||
(( $+mark )) && print -lr "MARK: $mark"
|
(( $+mark )) && print -lr "MARK: $mark"
|
||||||
zle accept-line
|
zle accept-line
|
||||||
}
|
}
|
||||||
zle -N expand-or-complete-with-report
|
zle -N complete-word-with-report
|
||||||
zle -N list-choices-with-report
|
zle -N list-choices-with-report
|
||||||
zle -N comp-finish
|
zle -N comp-finish
|
||||||
zle -N zle-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 "^D" list-choices-with-report
|
||||||
bindkey "^Z" comp-finish
|
bindkey "^Z" comp-finish
|
||||||
bindkey "^X" zle-finish
|
bindkey "^X" zle-finish
|
||||||
|
|
Loading…
Reference in a new issue