diff --git a/docs/config/launch.md b/docs/config/launch.md index 1708ef20d..91521dddd 100644 --- a/docs/config/launch.md +++ b/docs/config/launch.md @@ -22,6 +22,9 @@ have `$SHELL` set in the environment, you will need to sign out and sign back in again for the environment to pick up your new `$SHELL` value. +*Since: nightly builds only*: wezterm will now always resolve the shell via the +password database. + ### On Windows Systems 1. The value of the `%COMSPEC%` environment variable is used if it is set. diff --git a/env-bootstrap/src/lib.rs b/env-bootstrap/src/lib.rs index 267c401ba..b4c1c6a22 100644 --- a/env-bootstrap/src/lib.rs +++ b/env-bootstrap/src/lib.rs @@ -198,4 +198,10 @@ pub fn bootstrap() { // wezterm or the mux server from inside gnome terminal. // std::env::remove_var("VTE_VERSION"); + + // Sice folks don't like to reboot or sign out if they `chsh`, + // SHELL may be stale. Rather than using a stale value, unset + // it so that pty::CommandBuilder::get_shell will resolve the + // shell from the password database instead. + std::env::remove_var("SHELL"); }