]> Sergey Matveev's repositories - zsh-autoenv.git/blobdiff - autoenv.zsh
Quote assignments to pair/parent_file
[zsh-autoenv.git] / autoenv.zsh
index f7e4f983915b419113e1762d1401e75a98a6daaf..fd73a838bff60136d335e2a22c628ca36048ae22 100644 (file)
@@ -140,7 +140,7 @@ _autoenv_stack_entered_contains() {
 
 # Internal function for debug output. {{{
 _autoenv_debug() {
-  local msg=$1
+  local msg="$1"  # Might trigger a bug in Zsh 5.0.5 with shwordsplit.
   local level=${2:-1}
   if [[ $AUTOENV_DEBUG -lt $level ]]; then
     return
@@ -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