mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
bash: call autojump -a only if CWD changed
This commit is contained in:
parent
986f02124e
commit
a1baa90dc0
@ -57,7 +57,11 @@ fi
|
|||||||
|
|
||||||
autojump_add_to_database() {
|
autojump_add_to_database() {
|
||||||
if [[ "${AUTOJUMP_HOME}" == "${HOME}" ]]; then
|
if [[ "${AUTOJUMP_HOME}" == "${HOME}" ]]; then
|
||||||
autojump -a "$(pwd ${_PWD_ARGS})" 1>/dev/null 2>>"${AUTOJUMP_DATA_DIR}/autojump_errors"
|
AUTOJUMP_CWD="$(pwd ${_PWD_ARGS})"
|
||||||
|
if [[ "$AUTOJUMP_CWD" != "$AUTOJUMP_LASTWD" ]]; then
|
||||||
|
autojump -a "$AUTOJUMP_CWD" 1>/dev/null 2>>"${AUTOJUMP_DATA_DIR}/autojump_errors"
|
||||||
|
AUTOJUMP_LASTWD="$AUTOJUMP_CWD"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user