#114: Error message when directory does not exist or not in autojump database.

pull/119/head
William Ting 12 years ago
parent 465ca7908a
commit c91843c698

@ -80,4 +80,16 @@ case $PROMPT_COMMAND in
esac
alias jumpstat="autojump --stat"
function j { new_path="$(autojump $@)";if [ -d "${new_path}" ]; then echo -e "\\033[31m${new_path}\\033[0m"; cd "${new_path}";else false; fi }
function j {
new_path="$(autojump $@)"
if [ -d "${new_path}" ]; then
echo -e "\\033[31m${new_path}\\033[0m"
cd "${new_path}"
else
echo "autojump: directory '${@}' not found"
echo "Try \`autojump --help\` for more information."
false
fi
}

@ -52,4 +52,15 @@ preexec_functions+=autojump_preexec
alias jumpstat="autojump --stat"
function j { local new_path="$(autojump $@)";if [ -d "${new_path}" ]; then echo -e "\\033[31m${new_path}\\033[0m"; cd "${new_path}";else false; fi }
function j {
local new_path="$(autojump $@)"
if [ -d "${new_path}" ]; then
echo -e "\\033[31m${new_path}\\033[0m"
cd "${new_path}"
else
echo "autojump: directory '${@}' not found"
echo "Try \`autojump --help\` for more information."
false
fi
}

Loading…
Cancel
Save