Terminal: Fails to launch maximized/fullscreen and the given profile

Created on 17 Aug 2020  路  3Comments  路  Source: microsoft/terminal

Environment

Windows build number: Microsoft Windows [Version 10.0.18363.1016]
Windows Terminal version (if applicable): Version: 1.1.2233.0

Steps to reproduce

Open CMD and start wt maximized/fullscreen and a given profile, e.i. wt -M -p "Command Prompt"

Expected behavior

Windows Terminal opens in maximized mode with the "Command Prompt" profile

Actual behavior

Doesn't start and gives error:
image

Additional information

  • wt -M
    launches the terminal in maximized mode with default profile
  • wt -p "Command Prompt" -d D:/ ; -M
    launches the terminal maximized and the given profile, but with a second tab with the default profile
  • wt -p "Command Prompt" -d D:/ ; -M split-pane -d D:/ -p "Windows PowerShell"
    launches the terminal with 2 tabs with the selected profiles in maximized mode
  • wt -M -p "Command Prompt" -d D:/ ; split-pane -d D:/ -p "Windows PowerShell"
    doesn't work
Area-Commandline Issue-Bug Needs-Tag-Fix Priority-2 Product-Terminal Resolution-Fix-Committed

Most helpful comment

Whoops, you're totally right. This is an unusual interaction between the "default" command (new-tab) and arguments that belong to wt.

Right now, wt is treated like wt new-tab. Unfortunately, this means that wt -M is treated like wt new-tab -M, which definitely isn't valid. -M is an argument for the global context (and can only be specified before a command).

Workaround:

wt -M new-tab -p "Command prompt"

That also explains why your -M split-pane example works.

Sorry about that!

/cc @zadjii-msft

All 3 comments

-M and -F are only available in version 1.2+.

@DHowett
The docs didn't mention a version restriction. But more importantly, as I mentioned at the end of my post, wt -M as well as wt -p "profile 1" ; -M split-pane -p "profile 2" do work with my version of the terminal, so saying that -M/-F are only available in 1.2 can't be right?

Whoops, you're totally right. This is an unusual interaction between the "default" command (new-tab) and arguments that belong to wt.

Right now, wt is treated like wt new-tab. Unfortunately, this means that wt -M is treated like wt new-tab -M, which definitely isn't valid. -M is an argument for the global context (and can only be specified before a command).

Workaround:

wt -M new-tab -p "Command prompt"

That also explains why your -M split-pane example works.

Sorry about that!

/cc @zadjii-msft

Was this page helpful?
0 / 5 - 0 ratings