Browse files

Make new_path a local.

Leaking vars into the user's zsh env is not good, esp. when the var
refs a directory -- zsh may then interpret it as a named directory
ref and use it in prompts, for e.g.
  • Loading branch information...
1 parent 99d7291 commit eddceb7e8f10b238cb151dc7afc95bfed2530964 @sudish sudish committed with joelthelion Jan 16, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 autojump.zsh
@@ -23,4 +23,4 @@ preexec_functions+=autojump_preexec
alias jumpstat="autojump --stat"
-function j { new_path="$(autojump $@)";if [ -n "$new_path" ]; then echo -e "\\033[31m${new_path}\\033[0m"; cd "$new_path";fi }
+function j { local new_path="$(autojump $@)";if [ -n "$new_path" ]; then echo -e "\\033[31m${new_path}\\033[0m"; cd "$new_path";fi }

0 comments on commit eddceb7

Please sign in to comment.