diff --git a/.config/zsh/zshrc.d/40-functions.zsh b/.config/zsh/zshrc.d/40-functions.zsh index 8b15e96..64c63bb 100644 --- a/.config/zsh/zshrc.d/40-functions.zsh +++ b/.config/zsh/zshrc.d/40-functions.zsh @@ -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}" }