Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JS-Zheng
Copy link

  • 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: XDG config convention on all unix platforms #447

…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
@flyingice
Copy link

flyingice commented May 1, 2022

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:

def migrate_osx_xdg_data(config):

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants