New tab defaults to first item in list #10877

Closed
opened 2026-01-31 02:32:38 +00:00 by claunia · 3 comments
Owner

Originally created by @liamclarkedev on GitHub (Oct 2, 2020).

Environment

Windows build number: OS Build 19041.508
Windows Terminal version (if applicable): 1.3.2651.0

Steps to reproduce

Add newTab command

{ "command": { "action": "newTab", "index": 0 }, "keys": "ctrl+T" }

Set default shell to anything other than the first in the array

{
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "defaultProfile": "{ubuntu-guid}",
    "copyOnSelect": false,
    "copyFormatting": false,

    "profiles": {
        "defaults": {},
        "list": [
            {
                "guid": "{powershell-guid}",
                "name": "Windows PowerShell",
                "commandline": "powershell.exe",
                "hidden": false
            },
            {
                "guid": "{ubuntu-guid}",
                "hidden": false,
                "name": "Ubuntu",
                "source": "Windows.Terminal.Wsl",
            },
        ]
    },
    // ...
}

Create new tab with command

ctrl+T

Expected behavior

Expect it to take the default shell

Actual behavior

It takes the first in the list, in this case Windows PowerShell. It's not really an issue that would block anyone as you simply move the default object to the first item in the list, its just unexpected.

Originally created by @liamclarkedev on GitHub (Oct 2, 2020). # Environment ```none Windows build number: OS Build 19041.508 Windows Terminal version (if applicable): 1.3.2651.0 ``` # Steps to reproduce Add `newTab` command ``` { "command": { "action": "newTab", "index": 0 }, "keys": "ctrl+T" } ``` Set default shell to anything other than the first in the array ``` { "$schema": "https://aka.ms/terminal-profiles-schema", "defaultProfile": "{ubuntu-guid}", "copyOnSelect": false, "copyFormatting": false, "profiles": { "defaults": {}, "list": [ { "guid": "{powershell-guid}", "name": "Windows PowerShell", "commandline": "powershell.exe", "hidden": false }, { "guid": "{ubuntu-guid}", "hidden": false, "name": "Ubuntu", "source": "Windows.Terminal.Wsl", }, ] }, // ... } ``` Create new tab with command ``` ctrl+T ``` # Expected behavior Expect it to take the default shell # Actual behavior It takes the first in the list, in this case `Windows PowerShell`. It's not really an issue that would block anyone as you simply move the default object to the first item in the list, its just unexpected.
claunia added the Issue-QuestionNeeds-Tag-FixResolution-Answered labels 2026-01-31 02:32:38 +00:00
Author
Owner

@DHowett commented on GitHub (Oct 2, 2020):

{ "command": { "action": "newTab", "index": 0 }, "keys": "ctrl+T" }
                                   ^^^^^^^^^^
                                   this part means "first profile in the list"
@DHowett commented on GitHub (Oct 2, 2020): ``` { "command": { "action": "newTab", "index": 0 }, "keys": "ctrl+T" } ^^^^^^^^^^ this part means "first profile in the list" ```
Author
Owner

@liamclarkedev commented on GitHub (Oct 2, 2020):

{ "command": { "action": "newTab", "index": 0 }, "keys": "ctrl+T" }
                                   ^^^^^^^^^^
                                   this part means "first profile in the list"

Stupid moment... thanks, without thought I figured that was tab index, not array index

@liamclarkedev commented on GitHub (Oct 2, 2020): > ``` > { "command": { "action": "newTab", "index": 0 }, "keys": "ctrl+T" } > ^^^^^^^^^^ > this part means "first profile in the list" > ``` Stupid moment... thanks, without thought I figured that was tab index, not array index
Author
Owner

@DHowett commented on GitHub (Oct 2, 2020):

Hopefully #1564 goes some way towards helping! 😄

@DHowett commented on GitHub (Oct 2, 2020): Hopefully #1564 goes some way towards helping! :smile:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10877