mirror of
https://github.com/wez/wezterm.git
synced 2024-12-23 21:32:13 +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:
parent
a42342ce0c
commit
afc96688ae
@ -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`,
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user