zsh:funcs:suffix: Do not quote extra
Since 5258b5ed4217 ("zsh:funcs:suffix: Support quotes), all special are
escaped anyway (including whitespace), making it unnecessary to quote
the names extra.
This commit is contained in:
@@ -556,10 +556,10 @@ suffix() {
|
||||
local -a names
|
||||
# Take everything before "--" and quote special characters
|
||||
names=( "${(@q)@:1:$((i-1))}" )
|
||||
# Prepend an `*` to every element and quote the result
|
||||
names=( "${(@)names//(#b)(*)/\"*$match\"}")
|
||||
# Prepend an `*` to every element
|
||||
names=( "${(@)names//#/*}" )
|
||||
# Join with " -o -name " and then split again using shell parsing
|
||||
names=( "${(@zj: -o -name :)names}" )
|
||||
# Pass starting points and the names after removing one level of quotes
|
||||
find "${@:$((i+1))}" -name "${(@Q)names}"
|
||||
# Pass starting points and the name arguments
|
||||
find "${@:$((i+1))}" -name "${(@)names}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user