opensearch-project / opensearch-cli

A full-featured command line interface (CLI) for OpenSearch.
https://opensearch.org/docs/latest/clients/cli/
Apache License 2.0
44 stars 24 forks source link

[BUG] opensearch configuration should be in $XDG_CONFIG_HOME #74

Open robfig opened 1 year ago

robfig commented 1 year ago

What is the bug?

opensearch-cli creates a new directory in my home folder to store its configuration. The standard convention is to put it in $XDG_CONFIG_HOME instead, not $HOME. This standard is widely accepted & followed -- on my 1-month old workstation I have 48 sub-directories in ~/.config.

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

It is supported and accessible as os.UserConfigDir: https://pkg.go.dev/os#UserConfigDir

wbeckler commented 1 year ago

Sounds reasonable. Feel free to submit a PR if you're up for it.