ducaale / xh

Friendly and fast tool for sending HTTP requests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

macos: `xh` config directory not in xdg dirs

skshetry opened this issue · comments

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

xh/doc/xh.1

Lines 347 to 349 in 7c7b1e0

.B XH_CONFIG_DIR
Specifies where to look for config.json and named session data.
The default is ~/.config/xh for Linux/macOS and %APPDATA%\\xh for Windows.

xh/doc/xh.1

Lines 377 to 379 in 7c7b1e0

.I ~/.config/xh/config.json
xh configuration file. The only configurable option is "default_options"
which is a list of default shell arguments that gets passed to xh.

xh/doc/xh.1

Lines 389 to 390 in 7c7b1e0

.I ~/.config/xh/sessions
Session data directory grouped by domain and port number.

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.