diff --git a/.config/zsh/zshrc.d/40-functions.zsh b/.config/zsh/zshrc.d/40-functions.zsh index 442ee37..f861e57 100644 --- a/.config/zsh/zshrc.d/40-functions.zsh +++ b/.config/zsh/zshrc.d/40-functions.zsh @@ -689,9 +689,10 @@ diffcmds() { return 1 fi - # Split and quote special characters - template=("${(q@)@:1:$((i-1))}") - args=("${(q@)@:$((i+1))}") + # Quote special characters and split into arrays + set -- "${(q@)@}" + template=("${@:1:$((i-1))}") + args=("${@:$((i+1))}") # Unquote standalone pipes template=("${(@)template/#%\\|/|}")