feat: add support for respecting $XDG_DATA_HOME and $AUTOJUMP_DARWIN_XDG on macOS#647
Open
JS-Zheng wants to merge 1 commit into
Open
feat: add support for respecting $XDG_DATA_HOME and $AUTOJUMP_DARWIN_XDG on macOS#647JS-Zheng wants to merge 1 commit into
JS-Zheng wants to merge 1 commit into
Conversation
…XDG on macOS - respecting a new env `$AUTOJUMP_DARWIN_XDG`: If `$XDG_DATA_HOME` is set, use it as the autojump's data home; else if the OS is macOS and `$AUTOJUMP_DARWIN_XDG` is false, use ~/Library (for compatibility); otherwise, use XDG's fallback path (i.e., `~/.local/share`). - remove `migrate_osx_xdg_data( )` in autojump_data.py - related issue: wting#447
|
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: Line 98 in 06e082c 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
$AUTOJUMP_DARWIN_XDG: If$XDG_DATA_HOMEis set, use it as the autojump's data home; else if the OS is macOS and$AUTOJUMP_DARWIN_XDGis false, use~/Library(for compatibility); otherwise, use XDG's fallback path (i.e.,~/.local/share).migrate_osx_xdg_data()in autojump_data.py