Shouldn't help ( -h or --help) print to the console? #6835

Closed
opened 2026-01-31 00:48:30 +00:00 by claunia · 1 comment
Owner

Originally created by @MonkeyNinja on GitHub (Mar 11, 2020).

Not open a dialog...seems strange

Environment

Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd]
Windows Terminal version (if applicable):

Any other software?

Steps to reproduce

Expected behavior

Actual behavior

Originally created by @MonkeyNinja on GitHub (Mar 11, 2020). Not open a dialog...seems strange <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd] Windows Terminal version (if applicable): Any other software? ``` # Steps to reproduce <!-- A description of how to trigger this bug. --> # Expected behavior <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> # Actual behavior <!-- What's actually happening? -->
Author
Owner

@zadjii-msft commented on GitHub (Mar 11, 2020):

Oh it absolutely should, but shockingly, that's impossibly -.-

For reference, I'll refer you to this section in the spec for commandline arguments.

the TL;DR is that there are two types of executables on Windows: Windowed apps, and Console apps.

  1. A console app always needs a console, so if you were to launch wt from any context without a console (explorer, start menu, run dialog), then a console window will always be created for it.
  2. A Windows app can request a console is made for it, and can request to attache to it's parent console, but shells like cmd and powershell will have already continued running, because they don't wait for Windowed apps to complete before they return to the prompts.

Option 1 is bad, because we don't want another vintage console window appearing every time the Terminal is launched.

Option 2 is bad, because we can't print to the console before powershell or cmd has started printing again. Our output would get all mixed up with theirs.

So we opted for Option 3, which is to display a message box. This is at least an established pattern on Windows. In the meantime, we'll also be pushing on our side to try and make this better, because obviously this situation is not great.

@zadjii-msft commented on GitHub (Mar 11, 2020): Oh it absolutely _should_, but shockingly, that's impossibly -.- For reference, I'll refer you to [this section](https://github.com/microsoft/terminal/blob/master/doc/specs/%23607%20-%20Commandline%20Arguments%20for%20the%20Windows%20Terminal.md#subsystemwindows-or-subsystemconsole) in the spec for commandline arguments. the **TL;DR** is that there are two types of executables on Windows: Windowed apps, and Console apps. 1. A console app _always_ needs a console, so if you were to launch `wt` from any context _without_ a console (explorer, start menu, run dialog), then a console window will always be created for it. 2. A Windows app can request a console is made for it, and can request to attache to it's parent console, but shells like `cmd` and `powershell` will have already continued running, because they don't wait for Windowed apps to complete before they return to the prompts. Option 1 is bad, because we don't want _another_ vintage console window appearing every time the Terminal is launched. Option 2 is bad, because we can't print to the console before powershell or cmd has started printing again. Our output would get all mixed up with theirs. So we opted for Option 3, which is to display a message box. This is at least an established pattern on Windows. In the meantime, we'll also be pushing on our side to try and make this better, because obviously this situation is not great.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#6835