1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

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.
This commit is contained in:
Sudish Joseph 2010-01-16 08:32:18 +08:00 committed by Joel Schaerer
parent 99d72918c8
commit eddceb7e8f

View File

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