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.
pull/18/head
Sudish Joseph 15 years ago committed by Joel Schaerer
parent 99d72918c8
commit eddceb7e8f

@ -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 }

Loading…
Cancel
Save