microsoft / microsoft/terminal

New panes should inherit the tab color of the active pane when they're split

Open
#18,930 2 comments 1 reaction 0 assignees View on GitHub
Help Wanted Issue-Task Needs-Tag-Fix Priority-3 Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

### Windows Terminal version

1.22.11141.0

### Windows build number

10.0.26100.4061

### Other Software

_No response_

### Steps to reproduce

1. Close all instances of Microsoft Terminal
2. Open a cmd prompt or Powershell
3. Run this command:
- CMD: `wt new-tab -p "Windows PowerShell" --tabColor "#FF0000" --title "Hello World" ; split-pane -p "Windows PowerShell"`
- Powershell: ``wt new-tab -p "Windows PowerShell" --tabColor "#FF0000" --title "Hello World" ; split-pane -p "Windows PowerShell"``

### Expected Behavior

The resulting tab in Terminal should have the correct title and color set from command line.

![Image](https://github.com/user-attachments/assets/10ba4ef1-d17d-42b2-9823-ec7b16c047e7)

### Actual Behavior

The resulting tab in Terminal has the default title and color (not the ones defined in the command line).

![Image](https://github.com/user-attachments/assets/b2963e77-0274-4478-8f42-b2515bc0d69d)

If you run the same commands but with a semicolon at the end:
- CMD: `wt new-tab -p "Windows PowerShell" --tabColor "#FF0000" --title "Hello World" ; split-pane -p "Windows PowerShell" ;`
- Powershell: ``wt new-tab -p "Windows PowerShell" --tabColor "#FF0000" --title "Hello World" ; split-pane -p "Windows PowerShell" ;``
Then the resulting tab in Terminal have the correct title and color set from command line (and in addition, it opens another default terminal tab).

![Image](https://github.com/user-attachments/assets/152ec140-ac14-4c46-988d-702f9df4e6b4)

This is also the case using `"startupActions" inside `settings.json`:
- ❌ bugged: `"new-tab -p \"Windows PowerShell\" --tabColor \"#FF0000\" --title \"Hello World\" ; split-pane -p \"Windows PowerShell\""`
- ✅ okay: `"new-tab -p \"Windows PowerShell\" --tabColor \"#FF0000\" --title \"Hello World\" ; split-pane -p \"Windows PowerShell\" ;"`

Contributor guide

Open the contributing guide

Research direction

Start by tracing how the `wt` command processes `new-tab` followed by `split-pane`, comparing the behavior with and without the trailing semicolon. Reproduce the commands from the issue and verify that the split pane inherits the active pane's title and tab color without opening an extra tab.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.