nickgerace / gfold

CLI tool to help keep track of your Git repositories, written in Rust
https://crates.io/crates/gfold
Apache License 2.0
309 stars 20 forks source link

Add support for nested config file location on macOS and Linux #251

Open nickgerace opened 1 year ago

nickgerace commented 1 year ago

Currently, the config file is found at the following location on macOS and Linux ~/.config/gfold.toml.

We should consider adding support for a nested location as well, such as ~/.config/gfold/config.toml. Ironically, I believe that was the original location of the config file, but cannot remember for certain. Why not both?

uncenter commented 3 days ago

On the topic of config file locations we should look into adding support for XDG config directories, using https://docs.rs/etcetera/latest/etcetera/. If we want it to be truly backwards compatible, we could implement $XDG_CONFIG_HOME/gfold/config.toml and then leave ~/.config/gfold.toml as hardcoded to the ~/.config/ directory.