Provide a programmatic way to open a program in a new tab #5586

Open
opened 2026-01-31 00:16:44 +00:00 by claunia · 0 comments
Owner

Originally created by @pfmoore on GitHub (Dec 16, 2019).

Allow the user to open a new tab from the command line

Rather than opening a new tab by selecting an item from the drop-down menu, or pressing a shortcut key, allow the user to open a new tab using a command line. So, for example, to open an instance of Python in a new tab, something like new-tab python. Obviously the exact command name doesn't matter, the key is to have the functionality.

A similar feature is available in ConEmu, where the command line is scanned for a -new_console flag: python -new_console. I'm assuming that intercepting and scanning command lines is messier and less robust than a dedicated command would be. This feature is extremely useful when starting a command that should run "in the background" - for example when starting a Jupyter notebook session.

Proposed technical implementation details

This proposal would probably require exposing a programmatic API to "the currently running instance of terminal". Such an API could in practice have far wider reaching implications than just a "run command in new tab" API, and I understand that it could be a significant feature addition. At this point, though, I would be happy with a limited approach that only offered "open a new tab".

It's also possible that something like this already exists, but I haven't been able to find any documentation or examples of it, if that's the case.

Originally created by @pfmoore on GitHub (Dec 16, 2019). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Allow the user to open a new tab from the command line Rather than opening a new tab by selecting an item from the drop-down menu, or pressing a shortcut key, allow the user to open a new tab using a command line. So, for example, to open an instance of Python in a new tab, something like `new-tab python`. Obviously the exact command name doesn't matter, the key is to have the functionality. A similar feature is available in [ConEmu](https://conemu.github.io/), where the command line is scanned for a `-new_console` flag: `python -new_console`. I'm assuming that intercepting and scanning command lines is messier and less robust than a dedicated command would be. This feature is extremely useful when starting a command that should run "in the background" - for example when starting a Jupyter notebook session. # Proposed technical implementation details This proposal would probably require exposing a programmatic API to "the currently running instance of terminal". Such an API could in practice have far wider reaching implications than just a "run command in new tab" API, and I understand that it could be a significant feature addition. At this point, though, I would be happy with a limited approach that only offered "open a new tab". It's also possible that something like this already exists, but I haven't been able to find any documentation or examples of it, if that's the case.
claunia added the Issue-FeatureResolution-Duplicate labels 2026-01-31 00:16:44 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#5586