1
0
mirror of https://github.com/wting/autojump synced 2024-09-28 22:10:45 +00:00

Correct return from autojump_add_to_database.

This commit is contained in:
Lenard Szolnoki 2015-06-08 12:19:51 +02:00
parent 8b525c1b55
commit 1a30211d04

View File

@ -36,11 +36,13 @@ complete -F _autojump j
# change pwd hook # change pwd hook
autojump_add_to_database() { autojump_add_to_database() {
local ret_value="$?"
if [[ -f "${AUTOJUMP_ERROR_PATH}" ]]; then if [[ -f "${AUTOJUMP_ERROR_PATH}" ]]; then
(autojump --add "$(pwd)" >/dev/null 2>>${AUTOJUMP_ERROR_PATH} &) &>/dev/null (autojump --add "$(pwd)" >/dev/null 2>>${AUTOJUMP_ERROR_PATH} &) &>/dev/null
else else
(autojump --add "$(pwd)" >/dev/null &) &>/dev/null (autojump --add "$(pwd)" >/dev/null &) &>/dev/null
fi fi
return "$ret_value"
} }
case $PROMPT_COMMAND in case $PROMPT_COMMAND in