Function cli_config::locate_config
source · pub fn locate_config(prefix: &str, filename: &str) -> Option<PathBuf>
Expand description
Try to find the location of the first config file in the following paths:
- $XDG_CONFIG_HOME/{prefix}/{filename}.json
- $XDG_CONFIG_HOME/{prefix}.json
- $HOME/.config/{prefix}/{filename}
- $HOME/.{prefix}