1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-24 13:52:55 +03:00

Use $WEZTERM_CONFIG_FILE for config path if set

This makes it easier for me to test other configurations when
troubleshooting issues!
This commit is contained in:
Wez Furlong 2019-12-28 11:30:32 -08:00
parent a42342ce0c
commit afc96688ae
2 changed files with 5 additions and 0 deletions

View File

@ -7,6 +7,8 @@ title: Configuration
`wezterm` will look for a TOML configuration file in the following locations,
stopping at the first file that it finds:
* If the environment variable `$WEZTERM_CONFIG_FILE` is set, it will be treated as the
path to a configuration file.
* On Windows, `wezterm.toml` from the directory that contains `wezterm.exe`.
This is handy for users that want to carry their wezterm install around on a thumb drive.
* `$HOME/.config/wezterm/wezterm.toml`,

View File

@ -537,6 +537,9 @@ impl Config {
}
}
}
if let Some(path) = std::env::var_os("WEZTERM_CONFIG_FILE") {
paths.insert(0, path.into());
}
for p in &paths {
log::trace!("consider config: {}", p.display());