From 63303c2286c404830994aa1a7f7f62dc1e2be248 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sat, 14 Jan 2012 15:41:24 +0100 Subject: [PATCH] shell/function,zsh/rc: Replace $@ with "$@". "$@" is the only correct usage of $@. --- shell/functions | 2 +- zsh/rc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/shell/functions b/shell/functions index 4de9453..f3a4096 100644 --- a/shell/functions +++ b/shell/functions @@ -7,7 +7,7 @@ # available everywhere. source_debug() { if [ x$DEBUG != x ]; then - echo $@ + echo "$@" fi } diff --git a/zsh/rc b/zsh/rc index 84b27f7..ccc8ea7 100644 --- a/zsh/rc +++ b/zsh/rc @@ -78,17 +78,17 @@ if [[ $ZSH_VERSION != (4.3.<5->|4.<4->*|<5->*) ]]; then # arrays. function precmd() { for function in $precmd_functions; do - $function $@ + $function "$@" done } function preexec() { for function in $preexec_functions; do - $function $@ + $function "$@" done } function chpwd() { for function in $chpwd_functions; do - $function $@ + $function "$@" done } fi -- 2.45.2