ducaale / xh

Friendly and fast tool for sending HTTP requests
MIT License
4.96k stars 90 forks source link

macos: `xh` config directory not in xdg dirs #352

Closed skshetry closed 5 months ago

skshetry commented 5 months ago

The manpage documents ~/.config/xh as the default config directory for macOS and Linux.

https://github.com/ducaale/xh/blob/7c7b1e0f0d3b07978c6769d7930a0d36bb96637b/doc/xh.1#L347-L349

https://github.com/ducaale/xh/blob/7c7b1e0f0d3b07978c6769d7930a0d36bb96637b/doc/xh.1#L377-L379

https://github.com/ducaale/xh/blob/7c7b1e0f0d3b07978c6769d7930a0d36bb96637b/doc/xh.1#L389-L390

But xh uses the /Users/Alice/Library/Application Support/xh location on macOS, which comes from dirs::config_dir(), which uses the above-mentioned location.

This behavior differs from httpie, which uses xdg dirs, eg: ~/.config/httpie on non-Windows platforms.

See https://httpie.io/docs/cli/config.