mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
Quote $XDG_DATA_HOME when setting error file
I'm not sure if this is actually a bug in fish, but (test -d) with no argument returns true, and nonexistent environment variables return an empty string, so (test -d $XDG_DATA_HOME) returns true when $XDG_DATA_HOME isn't set. Prior to making this change, I would get an error from dirname when opening a shell and an error from fish when cd'ing.
This commit is contained in:
parent
c5f0473837
commit
491b4fd27b
@ -13,7 +13,7 @@ complete -x -c j -a '(autojump --complete (commandline -t))'
|
||||
# set error file location
|
||||
if test (uname) = "Darwin"
|
||||
set -x AUTOJUMP_ERROR_PATH ~/Library/autojump/errors.log
|
||||
else if test -d $XDG_DATA_HOME
|
||||
else if test -d "$XDG_DATA_HOME"
|
||||
set -x AUTOJUMP_ERROR_PATH $XDG_DATA_HOME/autojump/errors.log
|
||||
else
|
||||
set -x AUTOJUMP_ERROR_PATH ~/.local/share/autojump/errors.log
|
||||
|
Loading…
Reference in New Issue
Block a user