Skip to content

feat: Explain implicit new-tab arguments in root help menu (Fixes #9585)#20417

Open
ManyaS-Git wants to merge 1 commit into
microsoft:mainfrom
ManyaS-Git:fix-issue-9585
Open

feat: Explain implicit new-tab arguments in root help menu (Fixes #9585)#20417
ManyaS-Git wants to merge 1 commit into
microsoft:mainfrom
ManyaS-Git:fix-issue-9585

Conversation

@ManyaS-Git

Copy link
Copy Markdown

Summary

Adds a descriptive footer to the root wt help menu explaining that unrecognized arguments are implicitly passed to the new-tab subcommand. Closes #9585.

Problem

When users execute wt /? or wt --help, the command-line options specifically tied to tab-creation (like -d for starting directory or -p for profile) are not listed. This creates confusion because users frequently pass these arguments directly to wt without realizing they are actually invoking the implicit new-tab subcommand.

Root Cause

The root CLI parser (_app) is configured as a prefix command to support implicit subcommand execution. CLI11's help generation only lists arguments explicitly attached to the queried command, meaning arguments attached to new-tab are hidden when querying the root wt command's help.

Solution

Instead of duplicating argument definitions (which would break the subcommand fallback logic), this fix utilizes CLI11's footer() API. We append a localized note to the end of the root help text clarifying the implicit new-tab behavior and providing an example.

Testing

  • Manual Verification: Verified that running wt /? displays the localized footer.
  • Localization Checks: Added a {Locked="..."} comment block to Resources.resw to ensure automated translation tools do not mistakenly localize command-line string literals (e.g. wt, new-tab, -d).

Screenshots (if applicable)

(N/A - CLI text change only)

Checklist

  • Followed repository coding style
  • Added necessary localization locking comments
  • Kept commits focused and minimal
  • Tested command-line output locally

Here is your professional Git commit message and GitHub Pull Request description. You can copy and paste these directly into your terminal and GitHub!

---

### 📝 Git Commit Message

```text
feat(cli): explain implicit new-tab arguments in root help menu

Appends a footer to the root CLI parser help text (`wt /?`) explicitly stating
that unrecognized arguments (such as `-d` and `-p`) are automatically passed
to the `new-tab` subcommand.

This resolves user confusion when common tab-creation arguments are omitted
from the root help menu without breaking the CLI11 subcommand parsing logic.
Includes proper localization locks to prevent translation of CLI keywords.

Closes microsoft#9585
```

---

### 🚀 GitHub Pull Request

**Title:** `feat: Explain implicit new-tab arguments in root help menu (Fixes microsoft#9585)`

**Description:**
```markdown
## Summary
Adds a descriptive footer to the root `wt` help menu explaining that unrecognized arguments are implicitly passed to the `new-tab` subcommand. Closes microsoft#9585.

## Problem
When users execute `wt /?` or `wt --help`, the command-line options specifically tied to tab-creation (like `-d` for starting directory or `-p` for profile) are not listed. This creates confusion because users frequently pass these arguments directly to `wt` without realizing they are actually invoking the implicit `new-tab` subcommand.

## Root Cause
The root CLI parser (`_app`) is configured as a prefix command to support implicit subcommand execution. `CLI11`'s help generation only lists arguments explicitly attached to the queried command, meaning arguments attached to `new-tab` are hidden when querying the root `wt` command's help.

## Solution
Instead of duplicating argument definitions (which would break the subcommand fallback logic), this fix utilizes `CLI11`'s `footer()` API. We append a localized note to the end of the root help text clarifying the implicit `new-tab` behavior and providing an example.

## Testing
- **Manual Verification:** Verified that running `wt /?` displays the localized footer.
- **Localization Checks:** Added a `{Locked="..."}` comment block to `Resources.resw` to ensure automated translation tools do not mistakenly localize command-line string literals (e.g. `wt`, `new-tab`, `-d`).

## Screenshots (if applicable)
*(N/A - CLI text change only)*

## Checklist
- [x] Followed repository coding style
- [x] Added necessary localization locking comments
- [x] Kept commits focused and minimal
- [x] Tested command-line output locally
```
@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 Jul 14, 2026
@ManyaS-Git

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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. 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

1 participant