mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-09-20 20:48:06 +00:00
Fix +new-window -e <command> inheriting forced shell integration from the running GTK application.
Arguments after -e are now marked as an explicit command that requires shell detection. That marker is propagated with the existing command override to the new surface for both the current +new-window and +new-tab GTK paths. When the override is applied, forced shell integration becomes detect; an explicit none remains disabled. This is scoped to the GTK -e path. It does not change the generic forced shell-integration behavior, so configured integration continues to support shell executables with non-standard names. Fixes #12378.
This commit is contained in:
@@ -120,10 +120,11 @@ pub const Options = struct {
|
||||
/// and `--surface-id` flag) will be sent to the remote Ghostty instance and
|
||||
/// will be parsed as command line flags. These flags will override certain
|
||||
/// settings when creating the first surface in the new tab. Currently, only
|
||||
/// `--working-directory`, `--command`, and `--title` are supported. `-e` will
|
||||
/// also work as an alias for `--command`, except that if `-e` is found on the
|
||||
/// command line all following arguments will become part of the command and no
|
||||
/// more arguments will be parsed for configuration settings.
|
||||
/// `--working-directory`, `--command`, `--shell-integration=<mode>`, and
|
||||
/// `--title` are supported. `-e` will also work as an alias for `--command`, except that if
|
||||
/// `-e` is found on the command line all following arguments will become part
|
||||
/// of the command and no more arguments will be parsed for configuration
|
||||
/// settings.
|
||||
///
|
||||
/// If `--working-directory` is found on the command line and is a relative
|
||||
/// path (i.e. doesn't start with `/`) it will be resolved to an absolute
|
||||
@@ -164,6 +165,10 @@ pub const Options = struct {
|
||||
///
|
||||
/// * `--command`: The command to be executed in the first surface of the new tab.
|
||||
///
|
||||
/// * `--shell-integration=<mode>`: Whether to enable shell integration and
|
||||
/// which shell to use. See the main configuration documentation for
|
||||
/// supported values.
|
||||
///
|
||||
/// * `--working-directory=<directory>`: The working directory to pass to Ghostty.
|
||||
///
|
||||
/// * `--title`: A title that will override the title of the first surface in
|
||||
|
||||
@@ -119,10 +119,11 @@ pub const Options = struct {
|
||||
/// `--class` flag) will be sent to the remote Ghostty instance and will be
|
||||
/// parsed as command line flags. These flags will override certain settings
|
||||
/// when creating the first surface in the new window. Currently, only
|
||||
/// `--working-directory`, `--command`, and `--title` are supported. `-e` will
|
||||
/// also work as an alias for `--command`, except that if `-e` is found on the
|
||||
/// command line all following arguments will become part of the command and no
|
||||
/// more arguments will be parsed for configuration settings.
|
||||
/// `--working-directory`, `--command`, `--shell-integration=<mode>`, and
|
||||
/// `--title` are supported. `-e` will also work as an alias for `--command`, except that if
|
||||
/// `-e` is found on the command line all following arguments will become part
|
||||
/// of the command and no more arguments will be parsed for configuration
|
||||
/// settings.
|
||||
///
|
||||
/// If `--working-directory` is found on the command line and is a relative
|
||||
/// path (i.e. doesn't start with `/`) it will be resolved to an absolute path
|
||||
@@ -158,6 +159,10 @@ pub const Options = struct {
|
||||
///
|
||||
/// * `--command`: The command to be executed in the first surface of the new window.
|
||||
///
|
||||
/// * `--shell-integration=<mode>`: Whether to enable shell integration and
|
||||
/// which shell to use. See the main configuration documentation for
|
||||
/// supported values.
|
||||
///
|
||||
/// * `--working-directory=<directory>`: The working directory to pass to Ghostty.
|
||||
///
|
||||
/// * `--title`: A title that will override the title of the first surface in
|
||||
|
||||
Reference in New Issue
Block a user