mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-06-11 22:28:20 +00:00
Fix shell-integration-features being ignored when shell-integration is none
This commit is contained in:
@@ -114,9 +114,7 @@ pub fn setup(
|
||||
};
|
||||
|
||||
// Setup our feature env vars
|
||||
if (!features.cursor) try env.put("GHOSTTY_SHELL_INTEGRATION_NO_CURSOR", "1");
|
||||
if (!features.sudo) try env.put("GHOSTTY_SHELL_INTEGRATION_NO_SUDO", "1");
|
||||
if (!features.title) try env.put("GHOSTTY_SHELL_INTEGRATION_NO_TITLE", "1");
|
||||
try setupFeatures(env, features);
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -138,6 +136,17 @@ test "force shell" {
|
||||
}
|
||||
}
|
||||
|
||||
/// Setup shell integration feature environment variables without
|
||||
/// performing full shell integration setup.
|
||||
pub fn setupFeatures(
|
||||
env: *EnvMap,
|
||||
features: config.ShellIntegrationFeatures,
|
||||
) !void {
|
||||
if (!features.cursor) try env.put("GHOSTTY_SHELL_INTEGRATION_NO_CURSOR", "1");
|
||||
if (!features.sudo) try env.put("GHOSTTY_SHELL_INTEGRATION_NO_SUDO", "1");
|
||||
if (!features.title) try env.put("GHOSTTY_SHELL_INTEGRATION_NO_TITLE", "1");
|
||||
}
|
||||
|
||||
/// Setup the bash automatic shell integration. This works by
|
||||
/// starting bash in POSIX mode and using the ENV environment
|
||||
/// variable to load our bash integration script. This prevents
|
||||
|
||||
Reference in New Issue
Block a user