wting / autojump

A cd command that learns - easily navigate directories from the command line
Other
16.06k stars 702 forks source link

feat: add support for respecting $XDG_DATA_HOME and $AUTOJUMP_DARWIN_XDG on macOS #647

Open JS-Zheng opened 2 years ago

JS-Zheng commented 2 years ago
flyingice commented 2 years ago

Agree. I hope the program respect $XDG_DATA_HOME.

Today if we do a manual install by running install.py --destdir ~/.local on macOS. The install script will copy its shell config files to ~/.local/share/autojump. However, those files get deleted automatically after firing j command once, leading to a 'command not found' error the next time.

Culprit: https://github.com/wting/autojump/blob/06e082c91805cb022900819b2e0881eeae780d58/bin/autojump_data.py#L98

Strangely, the comments below state that 'Older versions incorrectly used Linux XDG_DATA_HOME paths on OS X. This migrates autojump files from ~/.local/share/autojump to ~/Library/autojump', which is an unreasonable behaviour for me.