From 6dd226d305750f37c2d20ed9ddddc123e407d76e Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Sun, 24 Mar 2024 18:22:43 +0100 Subject: [PATCH] zsh:diffcmds: Quote only once, for real now --- .config/zsh/zshrc.d/40-functions.zsh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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/#%\\|/|}")