Add send-input as Command-Line Argument #16774

Closed
opened 2026-01-31 05:22:26 +00:00 by claunia · 3 comments
Owner

Originally created by @joswr1ght on GitHub (Feb 14, 2022).

Description of the new feature/enhancement

Without specifying a custom profile, it is not possible to send a startup command in the default pane when starting Windows terminal. While the Windows Terminal command-line argument split-pane accepts a commandline argument to run a command, the default pane cannot run a command unless it is specified in the profile. This limits the flexibility of starting Windows Terminal with specific configurations defined at the command line.

For example, I can use command line arguments to customize panes and change the focus pane:

wt -M split-pane -s 0.1 -H -p "Command Prompt" ping -t www.google.com ; move-focus up ; split-pane -s 0.85 -H -p "Windows PowerShell"

Capture

The combination of split-pane and move-focus allows for tremendous flexibility in creating specific layouts for tasks. However, the default pane (top most in this screenshot) cannot accept a command line or any other input. The new panes through split-pane can accept input as a command-line argument, but the top-most pane cannot.

Proposed technical implementation details (optional)

Adding send-input as a command-line argument allows the user to have great flexibility in how commands are sent to different panes. Using move-focus, the user can send input into any pane to run startup commands as needed to meet specific Windows Terminal startup requirements.

With send-input as a command-line argument, the default pane could accept commands and other input without changing the Windows Terminal profile settings:

wt -M split-pane -s 0.1 -H -p "Command Prompt" ping -t www.google.com ; move-focus up ; split-pane -s 0.85 -H -p "Windows PowerShell" ; move-focus up ; send-input ping www.microsoft.com

Submitted for your review, thank you!

Originally created by @joswr1ght on GitHub (Feb 14, 2022). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 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! --> # Description of the new feature/enhancement <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> Without specifying a custom profile, it is not possible to send a startup command in the default pane when starting Windows terminal. While the Windows Terminal command-line argument `split-pane` accepts a `commandline` argument to run a command, the default pane cannot run a command unless it is specified in the profile. This limits the flexibility of starting Windows Terminal with specific configurations defined at the command line. For example, I can use command line arguments to customize panes and change the focus pane: ``` wt -M split-pane -s 0.1 -H -p "Command Prompt" ping -t www.google.com ; move-focus up ; split-pane -s 0.85 -H -p "Windows PowerShell" ``` ![Capture](https://user-images.githubusercontent.com/1318817/153871848-c1fb9f38-adef-41ea-babc-0e68b39e23ac.PNG) The combination of `split-pane` and `move-focus` allows for tremendous flexibility in creating specific layouts for tasks. However, the default pane (top most in this screenshot) cannot accept a command line or any other input. The new panes through `split-pane` can accept input as a command-line argument, but the top-most pane cannot. # Proposed technical implementation details (optional) <!-- A clear and concise description of what you want to happen. --> Adding `send-input` as a command-line argument allows the user to have great flexibility in how commands are sent to different panes. Using `move-focus`, the user can send input into any pane to run startup commands as needed to meet specific Windows Terminal startup requirements. With `send-input` as a command-line argument, the default pane could accept commands and other input without changing the Windows Terminal profile settings: ``` wt -M split-pane -s 0.1 -H -p "Command Prompt" ping -t www.google.com ; move-focus up ; split-pane -s 0.85 -H -p "Windows PowerShell" ; move-focus up ; send-input ping www.microsoft.com ``` Submitted for your review, thank you!
claunia added the Issue-FeatureResolution-Duplicate labels 2026-01-31 05:22:26 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Feb 14, 2022):

Thanks for the suggestion! This is actually already being tracked by another issue on our repo - please refer to #9368 for more discussion.

/dup #9368

@zadjii-msft commented on GitHub (Feb 14, 2022): Thanks for the suggestion! This is actually already being tracked by another issue on our repo - please refer to #9368 for more discussion. /dup #9368
Author
Owner

@ghost commented on GitHub (Feb 14, 2022):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Feb 14, 2022): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Author
Owner

@joswr1ght commented on GitHub (Feb 14, 2022):

Thank you @zadjii-msft !

@joswr1ght commented on GitHub (Feb 14, 2022): Thank you @zadjii-msft !
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16774