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

Follow the XDG base directory specification #145

Closed
arcresu opened this issue Jun 4, 2013 · 9 comments · Fixed by #920
Closed

Follow the XDG base directory specification #145

arcresu opened this issue Jun 4, 2013 · 9 comments · Fixed by #920

Comments

@arcresu
Copy link

arcresu commented Jun 4, 2013

Instead of using config at $HOME/.httpie, the default should be ${XDG_CONFIG_HOME:-$HOME/.config}/httpie for unix-based operating systems according to the XDG Base Directory Specification.

As well as keeping the home directory clean, the semantic separation of config, runtime data, cache data and user-local software by the spec is helpful to users and other tools (e.g. backup software).

In terms of migration, I would suggest using the xdg-compilant config location if it exists and falling back to the current default location. This would also negate the need for the $HTTPIE_CONFIG_DIR variable, so it could be removed/de-emphasised from the documentation but still checked for at least a few versions for compatibility.

@evanpurkhiser
Copy link

👍 for this. Though I think keeping HTTPIE_CONFIG_DIR around would be OK.

@Earnestly
Copy link

Please yes, thanks to many projects moving over to XDG I have finally managed to reduce my $HOME to only the files and directory that I created and care about (excluding historical hardcoded locations such as .ssh, .pki and so on).

That means over 70 projects support XDG in some form or another. Please consider doing this for httpie \o/

@evanpurkhiser
Copy link

Current work around is adding export HTTPIE_CONFIG_DIR="$XDG_CONFIG_HOME/httpie" to your bashrc.

@Earnestly
Copy link

Yes, I am aware of that, I currently have quite a few to maintain. It would be much better if this was supported by default.

@gulafaran
Copy link

keyword "work around", it would be such a perfect world if everyone could just stick some standard, and XDG base directory spec is a really good one. so i would also like to see supported by default

@mwilliammyers
Copy link

huge 👍 for this

@ghost
Copy link

ghost commented Feb 29, 2016

There is already a pull request for this. Any reason against this change?

@rixx
Copy link

rixx commented Jan 25, 2019

I just ran into this myself – are there any plans to change the default behaviour here?

@bitti
Copy link

bitti commented Mar 15, 2019

Yeah, it doesn't make much sense to trade less $HOME directory clutter for more environment setup clutter, so just changing the default is the way to go.

jkbrzt pushed a commit that referenced this issue May 21, 2020
On Unix-like systems, the configuration file now lives in
$XDG_CONFIG_HOME/httpie/ by default, not ~/.httpie/ (the behaviour on
Windows is unchanged). The previous location is still checked, in order
to support existing installations.

Searching $XDG_CONFIG_DIRS is still not supported.

Fixes #145; supersedes #436.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants