chiark / gitweb /
dot/bash_profile (__mdw_addto): Quote new value properly.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 17 Mar 2010 16:57:35 +0000 (16:57 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 17 Mar 2010 16:57:35 +0000 (16:57 +0000)
This surfaces on Windows, where directories on the PATH commonly have
spaces in their names (particularly `Program Files').

It doesn't look security critical: you have to be on the other side of
the airtight hatch to mess with my initial environment anyway.

dot/bash_profile

index abd34633a63c64800efa9d759c01eba6448b2a3e..513f754444945381eebcc7c53ce51dae4a2179dd 100644 (file)
@@ -49,7 +49,7 @@ __mdw_addto () {
     l) val=${new#:}:$val;;
     r) val=$val$new;;
   esac
-  case $change in t) export $var=$val ;; esac
+  case $change in t) export $var="$val" ;; esac
 }
 
 # --- Set the path variable ---