fix quoted path
authorIan Kelling <ian@iankelling.org>
Tue, 17 Jun 2014 06:24:41 +0000 (23:24 -0700)
committerIan Kelling <ian@iankelling.org>
Tue, 17 Jun 2014 06:24:41 +0000 (23:24 -0700)
lnf-function

index 61478e7..1780c8e 100644 (file)
@@ -39,8 +39,8 @@ replacing a file but not a directory. No ln option arguments are supported."
     elif [[ $# -ge 2 ]]; then
         if [[ -d ${!#} ]]; then
             local oldcwd=$PWD
-            cd ${!#} # last arg
-            for x in "${@:1:$(($#-1))}"; do # all but last arg
+            cd "${!#}" # last arg
+            for x in "${@:1:$(( $# - 1 ))}"; do # all but last arg
                 # remove any trailing slashes
                 x="${x%%+(/)}"
                 # remove any leading directory components