diff --git a/src/config/mod.rs b/src/config/mod.rs index 924801514..4cf626af0 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -593,6 +593,8 @@ impl Config { // Compute but discard the key bindings here so that we raise any // problems earlier than we use them. let _ = cfg.key_bindings()?; + + std::env::set_var("WEZTERM_CONFIG_FILE", p); return Ok((cfg.compute_extra_defaults(Some(p)), Some(p.to_path_buf()))); } diff --git a/src/main.rs b/src/main.rs index 2de7a7a9d..c764e707a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -689,6 +689,10 @@ fn maybe_show_configuration_error_window() { } fn run() -> anyhow::Result<()> { + if let Ok(exe) = std::env::current_exe() { + std::env::set_var("WEZTERM_EXECUTABLE", exe); + } + // This is a bit gross. // In order to not to automatically open a standard windows console when // we run, we use the windows_subsystem attribute at the top of this