@@ -9,7 +9,18 @@ use dirs::PROJECT_DIRS;
99use util::transpose;
1010
1111pub fn config_file() -> PathBuf {
12− PROJECT_DIRS.config_dir().join("config")
12+ match env::var("BAT_CONFIG_PATH") {
13+ Ok(env_path) => {
14+ let env_path_buf = PathBuf::from(env_path);
15+ if env_path_buf.is_file() {
16+ return env_path_buf;
17+ }
18+ else {
19+ return PROJECT_DIRS.config_dir().join("config");
20+ }
21+ }
22+ Err(_) => PROJECT_DIRS.config_dir().join("config"),
23+ }
1324}
1425
1526pub fn get_args_from_config_file() -> Result<Vec<OsString>, shell_words::ParseError> {