mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
Port “Test / create errors directory before writing to it. (573c1ea418
)” to fish shell
This commit is contained in:
parent
f75d01299d
commit
9ad75a54c7
@ -19,11 +19,18 @@ else
|
||||
set -x AUTOJUMP_ERROR_PATH ~/.local/share/autojump/errors.log
|
||||
end
|
||||
|
||||
if test ! -d "(dirname $AUTOJUMP_ERROR_PATH)"
|
||||
mkdir -p "(dirname $AUTOJUMP_ERROR_PATH)"
|
||||
end
|
||||
|
||||
# change pwd hook
|
||||
function __aj_add --on-variable PWD
|
||||
status --is-command-substitution; and return
|
||||
autojump --add (pwd) >/dev/null 2>>$AUTOJUMP_ERROR_PATH &
|
||||
if test -f "$AUTOJUMP_ERROR_PATH"
|
||||
autojump --add (pwd) >/dev/null 2>>$AUTOJUMP_ERROR_PATH &
|
||||
else
|
||||
autojump --add (pwd) >/dev/null &
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user