input: add new_tab_with_command keybind action#12984
Open
jamesarch wants to merge 1 commit into
Open
Conversation
Author
|
Design discussion for the window/split question opened in #12985. |
183b67f to
e368af3
Compare
Adds a new keybind action that opens a new tab running the given
command instead of the configured default, e.g.:
keybind = cmd+ctrl+digit_1=new_tab_with_command:ssh myhost
The surface configuration plumbing (command override, inherited
config notification) already existed; this exposes it through a
binding action. macOS implements the full behavior; GTK currently
falls back to a plain new tab.
e368af3 to
ceeca73
Compare
bo2themax
approved these changes
Jun 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new keybind action
new_tab_with_command:<command>that opens a new tab running the given command instead of the configured default:This gives a lightweight version of iTerm2's "profile that runs a command" workflow: a dedicated shortcut per remote host or tool, each opening in a native tab.
Vouched in #12977. Design discussion for window/split variants: #12985.
Implementation notes
SurfaceConfiguration.commandand the inherited-config notification on macOS); this change only exposes it through a binding action.OpenUrlpattern for passing a C-ABI string across the boundary.wait-after-commandwere enabled — both inherited from the existing embedded surface-config behavior, and documented in the action's doc comment.new_tab. I don't have a Linux dev setup to wire and test the GTK side properly, so I kept it compiling with a graceful fallback rather than shipping untested code. Happy to do a follow-up if someone can point me at the right spot in the GTK apprt.parse: new_tab_with_command);zig fmtclean; targeted tests pass locally on macOS.Open design question
@jcollie asked in the vouch discussion whether there should be similar actions for new windows and splits, and whether that should be one parameterized action or separate actions. I kept this PR minimal: tab only, as a separate action mirroring the existing
new_tabnaming. Discussion opened in #12985 — happy to rework toward whichever direction maintainers prefer.AI disclosure
Per
AI_POLICY.md: this change was developed with assistance from Claude Code (Anthropic). I directed the design, reviewed and understand every line (the patch is purely additive and follows existing patterns), and built and tested the result locally on macOS, where I run it as my daily driver.🤖 Generated with Claude Code