Skip to content

gtk: Make the -e flag for +new-window work #8862

Description

@mitchellh

Discussion: #8860

NOTE THAT ghostty -e foo WORKS FINE. This issue is tracking the -e flag specifically on the +new-window subcommand, which is a totally separate machine.

This should work. I think @jcollie put a lot of the groundwork in already.

Activity

  1. pandalec commented on Sep 23, 2025

    @pandalec
  2. mitchellh commented on Sep 23, 2025

    @mitchellh
    ContributorAuthor

    @pandalec unrelated, open a new discussion

  3. Syphdias commented on Sep 23, 2025

    @Syphdias
    Contributor

    Note that ghostty +new-window -h already claims this works:

    /// If the `-e` flag is included on the command line, any arguments that follow
    /// will be sent to the running Ghostty instance and used as the command to run
    /// in the new window rather than the default. If `-e` is not specified, Ghostty
    /// will use the default command (either specified with `command` in your config
    /// or your default shell as configured on your system).

  4. jcollie commented on Sep 23, 2025

    @jcollie
    Member

    Note that ghostty +new-window -h already claims this works:

    It claims that it works. It kinda does, in that the arguments are sent to the Ghostty instance, but nothing is done with them other than emit some debug logs.

  5. Syphdias commented on Sep 23, 2025

    @Syphdias
    Contributor

    As clearly stated by the commit :) 824185f

  6. added a commit that references this issue on Oct 5, 2025
  7. guemidiborhane commented on Oct 29, 2025

    @guemidiborhane

    Are there any plans to implement it at some point?

  8. WieeRd commented on Jan 10, 2026

    @WieeRd

    #8860 (comment)

    The docs should be updated, we didn't get this in for 1.2.0 and don't consider this a bug. This will ship in a 1.3. I'll make an issue to track it though.

    Shouldn't this issue be added to the 1.3 milestone? Or has it been postponed to 1.4 and later?

  9. WieeRd commented on Jan 10, 2026

    @WieeRd

    Is only -e the subject for support or other flags as well?

    I'm looking specifically at these 2 flags:

    • window-inherit-working-directory: Having an option to spawn a new surface with or without inheriting working directory would be useful.

    • x11-instance-name: Currently, single instance has to be disabled to be able to use toggleable terminals in tiling WMs. This is because the process used to launch the terminal and the actual terminal window do not match. If x11-instance-name is supported with +new-window this could be worked around by setting a custom WM_CLASS and making the WM match against it to track the new terminal window to be made toggleable.

  10. b0o commented on Jan 16, 2026

    @b0o

    Until this is fixed, it would be nice if +new-window --help noted that this doesn't work yet.

  11. ulzu commented on Jan 17, 2026

    @ulzu

    Until this is fixed, it would be nice if +new-window --help noted that this doesn't work yet.

    not only that - man ghostty says +new-window is Only supported on GTK.
    misleading!

  12. jcollie commented on Jan 24, 2026

    @jcollie
    Member

    FYI, making +new-window and -e work in a single Ghostty instance is not going to be in 1.3. If someone wanted to work on a PR to update the various bits of documentation that says that it does work in a single Ghostty instance that would be appreciated.

  13. incogcyberpunk commented on Feb 2, 2026

    @incogcyberpunk
  14. 28 remaining items

  15. added a commit that references this issue on Mar 4, 2026
    46522a8
  16. added 2 commits that reference this issue on Mar 5, 2026
    794bc64
    2181fca
  17. added a commit that references this issue on Mar 10, 2026
    1dd0c81
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions