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

Adhere to the XDG base directory specification #27

Closed
piegamesde opened this issue Apr 21, 2020 · 5 comments
Closed

Adhere to the XDG base directory specification #27

piegamesde opened this issue Apr 21, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@piegamesde
Copy link

Is your feature request related to a problem? Please describe.

Since gitui has no configuration (yet?), this may be a bit early, but you're already on the wrong path:

to enable logging to ~/.gitui/gitui.log:

So please don't do that and use the XDG environment variables do determine where to put config, log and other files.

Additional context

https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

@extrawurst
Copy link
Owner

That is a very good point. I was wondering what is the "standard" here! Thanks for pointing me in the right direction.

@extrawurst
Copy link
Owner

@piegamesde does that adhere to convention on linux?

this will log to:

  • $HOME/Library/Caches/gitui/gitui.log (mac)
  • $XDG_CACHE_HOME/gitui/gitui.log (linux using XDG)
  • $HOME/.cache/gitui/gitui.log (linux otherwise)

@piegamesde
Copy link
Author

LGTM, even if I can't speak for MAC users (in theory the XDG specification is not limited to Linux, but ¯_(ツ)_/¯ ). You could partly follow the specification on MAC by using $XDG_CACHE_HOME if set, but defaulting to $HOME/Library/Caches instead of $HOME/.cache if not.

@extrawurst
Copy link
Owner

merged

@piegamesde
Copy link
Author

Thx

@piegamesde piegamesde changed the title Adhere to the XDG base directory specicifation Adhere to the XDG base directory specification Nov 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants