Skip to content

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

Open
JS-Zheng wants to merge 1 commit into
wting:masterfrom
JS-Zheng:master
Open

feat: add support for respecting $XDG_DATA_HOME and $AUTOJUMP_DARWIN_XDG on macOS#647
JS-Zheng wants to merge 1 commit into
wting:masterfrom
JS-Zheng:master

Conversation

@JS-Zheng

Copy link
Copy Markdown
  • 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

flyingice commented May 1, 2022

Copy link
Copy Markdown

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.

2 participants