Port “Test / create errors directory before writing to it. (573c1ea418)” to fish shell

pull/329/head
Leonid Shevtsov 10 years ago
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…
Cancel
Save