]> Sergey Matveev's repositories - zsh-autoenv.git/blobdiff - autoenv.zsh
Quote assignments to pair/parent_file
[zsh-autoenv.git] / autoenv.zsh
index 7b6d8da04038632136792d4924f933915e1ea603..fd73a838bff60136d335e2a22c628ca36048ae22 100644 (file)
@@ -186,7 +186,7 @@ _autoenv_hash_pair() {
 
 _autoenv_authorized_env_file() {
   local env_file=$1
-  local pair=$(_autoenv_hash_pair $env_file)
+  local pair="$(_autoenv_hash_pair $env_file)"
   test -f $AUTOENV_AUTH_FILE \
     && \grep -qF $pair $AUTOENV_AUTH_FILE
 }
@@ -286,7 +286,7 @@ _autoenv_get_file_upwards() {
     if [[ $parent_dir == $last ]]; then
       break
     fi
-    parent_file="${parent_dir}/${look_for}"
+    local parent_file="${parent_dir}/${look_for}"
 
     if [[ -f $parent_file ]]; then
       echo $parent_file