]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
shell/function,zsh/rc: Replace $@ with "$@".
authorSimon Ruderich <simon@ruderich.org>
Sat, 14 Jan 2012 14:41:24 +0000 (15:41 +0100)
committerSimon Ruderich <simon@ruderich.org>
Sat, 14 Jan 2012 14:41:24 +0000 (15:41 +0100)
"$@" is the only correct usage of $@.

shell/functions
zsh/rc

index 4de94539ef11889737734cda42c9049d1bb48101..f3a4096b51b00238efec9d8927b2555a7f2538aa 100644 (file)
@@ -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 84b27f73a35887173f0a1df7131970f88f47dfbc..ccc8ea7638fcb3f85cca76e3fbe2e77f724687a9 100644 (file)
--- 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