getkirby / cli

Kirby Command Line Interface
MIT License
51 stars 5 forks source link

Support for `XDG_CONFIG_HOME` #9

Closed lukasbestle closed 1 year ago

lukasbestle commented 1 year ago

On Linux desktop systems, config files such as the global commands for the CLI (currently stored in ~/.kirby) are expected to be stored in XDG_CONFIG_HOME (which is often ~/.config). So on Linux the default path for global commands should be ~/.config/kirby.

Possible implementation: If the XDG_CONFIG_HOME env variable is set, the default global directory should be set to $_ENV['XDG_CONFIG_HOME'] . '/kirby'. If it is not set, the current default of ~/.kirby should be used.

S1SYPHOS commented 1 year ago

Hopefully that's something you can work with. As XDG specs are nowhere top priority, this is but a small contribution. Thanks for your work on Kirby!

Cheers S1SYPHOS

bastianallgeier commented 1 year ago