Suggestion: config should be stored in ~/.config/op
It looks like op
stores information about previously-signed-in teams in ~/.op/config
. It would be nice if this was stored in ${XDG_CONFIG_HOME:-~/.config}/op/config
(to use Bash's syntax for fallback values for environment variables).
That said, I'm not really sure this counts as config, since it's not user-editable data. Perhaps it should be data instead, which would be ${XDG_DATA_HOME:-~/.local/share}/op
, or cache, which would be ${XDG_CACHE_HOME:-~/.cache}/op
.
This would make op
more consistent with a number of other tools and avoid littering the home folder with yet another dotfile.
1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Sync Type: Not Provided
Comments
-
Hi @kballard,
Thank you for writing in and for your suggestion! The tool does take into consideration
XDG_CONFIG_HOME
environment variable to determine where to store its configuration. Currently theconfig
file would be stored in$XDG_CONFIG_HOME/.op/config
. IfXDG_CONFIG_HOME
environment variable is not set or is empty, then the tool would fallback to storing its configuration in the home folder.Please let us know if this is not the behavior you are observing.
As for whether the stored configuration files belong in config, data, or cache category... we value your opinion, and we will bring it up for an internal debate in future.
Kind regards,
Konstantin0 -
I haven't tried setting
$XDG_CONFIG_HOME
, but the standard behavior for tools that use this variable is to fall back to behaving as thoughXDG_CONFIG_HOME
is set to~/.config
if the variable is unset. You can find more information at the XDG Base Directory Specification.0 -
Thank you for the link @kballard. You've got a good point there. We will discuss the fallback location internally with the team to see if we can deploy such change safely without disrupting the service for existing customers.
Kind regards,
Konstantin0 -
Just found this and agree with the op (no pun intended lol)
0 -
Ha! Nevertheless, well played. Thanks for letting us know you'd gopher that change too. :crazy:
0