mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-06-08 12:54:28 +00:00
shell-integration: bash must be explicitly enabled
For now, bash integration must be explicitly enabled (by setting `shell-integration = bash`). Our automatic shell integration requires bash version 4 or later, and systems like macOS continue to ship bash version 3 by default. This approach avoids the cost of performing a runtime version check.
This commit is contained in:
@@ -57,7 +57,11 @@ pub fn setup(
|
||||
};
|
||||
|
||||
const result: ShellIntegration = shell: {
|
||||
if (std.mem.eql(u8, "bash", exe)) {
|
||||
// For now, bash integration must be explicitly enabled via force_shell.
|
||||
// Our automatic shell integration requires bash version 4 or later,
|
||||
// and systems like macOS continue to ship bash version 3 by default.
|
||||
// This approach avoids the cost of performing a runtime version check.
|
||||
if (std.mem.eql(u8, "bash", exe) and force_shell == .bash) {
|
||||
const new_command = try setupBash(
|
||||
alloc_arena,
|
||||
command,
|
||||
@@ -129,6 +133,8 @@ test "force shell" {
|
||||
/// our script's responsibility (along with disabling POSIX
|
||||
/// mode).
|
||||
///
|
||||
/// This approach requires bash version 4 or later.
|
||||
///
|
||||
/// This returns a new (allocated) shell command string that
|
||||
/// enables the integration or null if integration failed.
|
||||
fn setupBash(
|
||||
|
||||
Reference in New Issue
Block a user