mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
#114: Error message when directory does not exist or not in autojump database.
This commit is contained in:
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
|
||||
}
|
||||
|
13
autojump.zsh
13
autojump.zsh
@ -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…
Reference in New Issue
Block a user