Skip to content

Clarify default new-tab command in help#20176

Closed
nightt5879 wants to merge 2 commits into
microsoft:mainfrom
nightt5879:nightt5879/fix-9585-commandline-help
Closed

Clarify default new-tab command in help#20176
nightt5879 wants to merge 2 commits into
microsoft:mainfrom
nightt5879:nightt5879/fix-9585-commandline-help

Conversation

@nightt5879

Copy link
Copy Markdown

Summary of the Pull Request

Clarifies the top-level wt help output for the implicit new-tab behavior. When no command is specified, wt treats the command line as new-tab; the help text now states that and points users to wt new-tab --help for options such as -d,--startingDirectory.

References and Relevant Issues

Fixes #9585

Detailed Description of the Pull Request / Additional comments

This adds a CLI11 footer to the root command-line parser, backed by a new CmdHelpFooter resource string. It also updates the existing simple help test to assert that the top-level help mentions new-tab, wt new-tab --help, and -d,--startingDirectory.

Validation Steps Performed

  • Parsed src/cascadia/TerminalApp/Resources/en-US/Resources.resw as XML successfully.
  • Reviewed the staged diff to confirm the change is limited to command-line help text and the corresponding test assertion.
  • Full local C++/TAEF tests were not run because msbuild is not available on this machine's PATH.

PR Checklist

@microsoft-github-policy-service microsoft-github-policy-service Bot added Issue-Task It's a feature request, but it doesn't really need a major design. Area-Commandline wt.exe's commandline arguments Product-Terminal The new Windows Terminal. labels May 3, 2026
@nightt5879

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@nightt5879 nightt5879 marked this pull request as ready for review May 3, 2026 08:59
@nightt5879

Copy link
Copy Markdown
Author

Hi maintainers, just checking whether there is anything else I should adjust here. This PR addresses #9585 and keeps the change scoped to the root help text plus the related test.

@zadjii-msft zadjii-msft left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full local C++/TAEF tests were not run because msbuild is not available on this machine's PATH

That would suggest to me that you haven't built and run this code locally? That does seem to me like it would be the bear minimum requirement to filing a PR.

Can you please build this yourself locally, and add a screenshot of it running?

Moreso - I worry that this .footer leaks onto the output of all of the subcommands as well, resulting in wt sp --help also mentioning that the default subcommand is new-tab. That seems like noise to me.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jun 24, 2026
@nightt5879

Copy link
Copy Markdown
Author

@zadjii-msft Sorry about that. You were right to call this out. I had not fully set up the local TAEF/UAP test environment before posting the earlier note.

I have now set it up locally, built the relevant Debug x64 test projects, and ran the command line parser tests locally.

You were also right about the .footer concern: it was leaking into subcommand help. I updated the parser so the footer stays on the root wt --help output only, and added test coverage to verify subcommand help does not include the root-only footer.

Local validation:

  • Built TerminalApp.LocalTests.vcxproj Debug x64 locally
  • Built TestHostApp.vcxproj Debug x64 locally
  • Ran TerminalAppLocalTests::CommandlineTest locally with TAEF
  • Result: Total=41, Passed=41, Failed=0, Blocked=0, Not Run=0, Skipped=0
6dd7dbd1-83c7-45da-999a-d11b23b8f751

@microsoft-github-policy-service microsoft-github-policy-service Bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jun 24, 2026
@zadjii-msft

Copy link
Copy Markdown
Member

That's a screenshot of the tests running. Show me the message.

@nightt5879

Copy link
Copy Markdown
Author

That's a screenshot of the tests running. Show me the message.

You're right, the previous screenshot only showed the tests running, not the actual message.
I reran the targeted local TAEF tests and confirmed the output below.
I ran:

.\packages\Microsoft.Taef.10.100.251104001\build\Binaries\x64\te.exe 
.\bin\x64\Debug\TestHostApp\TerminalApp.LocalTests.dll /name:CommandlineTest::ParseSimpleHelp

Result:

Summary: Total=4, Passed=4, Failed=0, Blocked=0, Not Run=0, Skipped=0
Actual message from the wt.exe --help case:
If no command is specified, "new-tab" is assumed by default. Use "wt new-tab --help" to view new-tab options, including "-d,--startingDirectory".

I ran:

.\packages\Microsoft.Taef.10.100.251104001\build\Binaries\x64\te.exe 
.\bin\x64\Debug\TestHostApp\TerminalApp.LocalTests.dll /name:CommandlineTest::ParseSubcommandHelp

Result:

Summary: Total=4, Passed=4, Failed=0, Blocked=0, Not Run=0, Skipped=0
For the subcommand help cases, I confirmed that the root-only footer does not appear. The local test verifies this with:
Verify: AreEqual(std::string::npos, appArgs._exitMessage.find("If no command is specified"))
Verify: AreEqual(std::string::npos, appArgs._exitMessage.find("assumed by default"))

@DHowett

DHowett commented Jun 25, 2026

Copy link
Copy Markdown
Member

I'm sorry, your AI bot seems unable to comprehend what we are asking for :(

@DHowett DHowett closed this Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Commandline wt.exe's commandline arguments Issue-Task It's a feature request, but it doesn't really need a major design. Needs-Attention The core contributors need to come back around and look at this ASAP. Product-Terminal The new Windows Terminal.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

the cli parameter -d is not shown in help

3 participants