1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-23 16:40:24 +02:00

41265: quote the inserted file names as necessary

This commit is contained in:
Wieland Hoffmann 2017-06-16 22:28:54 -07:00 committed by Barton E. Schaefer
parent 6ecc34a55e
commit cf72c2d288
2 changed files with 7 additions and 2 deletions

View file

@ -12,7 +12,7 @@ setopt nobadpattern
local key str files
files=( *(N) )
files=( *(N:q) )
if (( $#files )); then
zle -R "files: ${str}_" "$files[@]"
else
@ -26,7 +26,7 @@ while [[ '#key' -ne '#\\r' && '#key' -ne '#\\n' &&
else
str="$str$key"
fi
eval "files=( \${~str}*(N) )"
eval "files=( \${~str}*(N:q) )"
if (( $#files )); then
zle -R "files: ${str}_" "$files[@]"
else