diff --git a/autojump.bash b/autojump.bash index a1b8747..8d21b7d 100644 --- a/autojump.bash +++ b/autojump.bash @@ -26,7 +26,7 @@ _autojump() } complete -F _autojump j data_dir=${XDG_DATA_HOME:-$([ -e ~/.local/share ] && echo ~/.local/share || echo ~)} -if [ "$data_dir" = "~" ] +if [[ "$data_dir" = "${HOME}" ]] then export AUTOJUMP_DATA_DIR=${data_dir} else diff --git a/autojump.zsh b/autojump.zsh index 310a292..3079aff 100755 --- a/autojump.zsh +++ b/autojump.zsh @@ -15,7 +15,7 @@ #along with autojump. If not, see . local data_dir=${XDG_DATA_HOME:-$([ -e ~/.local/share ] && echo ~/.local/share || echo ~)} -if [ "$data_dir" = "~" ] +if [[ "$data_dir" = "${HOME}" ]] then export AUTOJUMP_DATA_DIR=${data_dir} else