mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-07 21:31:17 +02:00
49572: Let _expand preserve array form w/out zstyle glob
This commit is contained in:
parent
9c515a5a2f
commit
c7f4634549
3 changed files with 16 additions and 1 deletions
|
@ -1,5 +1,9 @@
|
||||||
2021-11-12 Oliver Kiddle <opk@zsh.org>
|
2021-11-12 Oliver Kiddle <opk@zsh.org>
|
||||||
|
|
||||||
|
* Marlon: 49572: Completion/Base/Completer/_expand,
|
||||||
|
Test/Y01completion.ztst: Let _expand preserve array form w/out
|
||||||
|
zstyle glob
|
||||||
|
|
||||||
* unposted: Completion/Unix/Command/_ansible: fix case statement
|
* unposted: Completion/Unix/Command/_ansible: fix case statement
|
||||||
fall-through for ansible-galaxy role completion
|
fall-through for ansible-galaxy role completion
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ subd=("$exp[@]")
|
||||||
|
|
||||||
# We need to come out of this with consistent quoting, by hook or by crook.
|
# We need to come out of this with consistent quoting, by hook or by crook.
|
||||||
integer done_quote
|
integer done_quote
|
||||||
local orig_exp=$exp
|
local -a orig_exp=( $exp )
|
||||||
if [[ "$force" = *g* ]] || zstyle -T ":completion:${curcontext}:" glob; then
|
if [[ "$force" = *g* ]] || zstyle -T ":completion:${curcontext}:" glob; then
|
||||||
eval 'exp=( ${~exp//(#b)\\([ \"'"\'"'
|
eval 'exp=( ${~exp//(#b)\\([ \"'"\'"'
|
||||||
])/$match[1]} ); exp=( ${(q)exp} )' 2>/dev/null && (( $#exp )) && done_quote=1
|
])/$match[1]} ); exp=( ${(q)exp} )' 2>/dev/null && (( $#exp )) && done_quote=1
|
||||||
|
|
|
@ -62,6 +62,17 @@
|
||||||
>line: {: dir1 dir2 file1 file2 }{}
|
>line: {: dir1 dir2 file1 file2 }{}
|
||||||
>line: {: *}{}
|
>line: {: *}{}
|
||||||
|
|
||||||
|
comptesteval $'zstyle \'*\' glob no'
|
||||||
|
comptesteval $'typeset -g tst=(*)'
|
||||||
|
comptest $': $tst\C-D'
|
||||||
|
0:_expand preserves array form
|
||||||
|
>DESCRIPTION:{expansions}
|
||||||
|
>NO:{dir1}
|
||||||
|
>NO:{dir2}
|
||||||
|
>NO:{file1}
|
||||||
|
>NO:{file2}
|
||||||
|
|
||||||
|
comptesteval $'zstyle -d \'*\' glob'
|
||||||
comptesteval '_users () { compadd user1 user2 }'
|
comptesteval '_users () { compadd user1 user2 }'
|
||||||
comptest $': ~\t\t\t\t\t'
|
comptest $': ~\t\t\t\t\t'
|
||||||
0:tilde
|
0:tilde
|
||||||
|
|
Loading…
Reference in a new issue