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:

  1. $XDG_CONFIG_HOME/{prefix}/{filename}.json
  2. $XDG_CONFIG_HOME/{prefix}.json
  3. $HOME/.config/{prefix}/{filename}
  4. $HOME/.{prefix}