Command Palette: Action and command line mode in relation to char > #10769

Closed
opened 2026-01-31 02:29:50 +00:00 by claunia · 11 comments
Owner

Originally created by @thernstig on GitHub (Sep 25, 2020).

Originally assigned to: @zadjii-msft on GitHub.

Description of the new feature/enhancement

In VS Code, pressing ctrl+shift+p opens the command palette with >.
In Windows terminal, pressing ctrl+shift+p opens the command palette without >.

But both mean the same thing i.e. if I enter some text I find commands to execute.

As I expect many users will use VS Code + Windows Terminal when developing on Windows, would it not be better to correlate these? The benefits are:

  1. > means the same thing for both apps, which decreases cognitive load.
  2. It is easier to press backspace to remove the > than it is to add the >.

I.e. I think the > should instead mean "action mode" whilst no > will mean command line mode, according to https://devblogs.microsoft.com/commandline/windows-terminal-preview-1-3-release/ (see under "Command palette").

I realize this might have been discussed when implementing this, but in that case and if this issue is closed, it might serve as a reference to other users being confused by this unfortunate discrepancy.

Originally created by @thernstig on GitHub (Sep 25, 2020). Originally assigned to: @zadjii-msft on GitHub. <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 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! --> # Description of the new feature/enhancement In VS Code, pressing `ctrl+shift+p` opens the command palette with `>`. In Windows terminal, pressing `ctrl+shift+p` opens the command palette without `>`. But both mean the same thing i.e. if I enter some text I find commands to execute. As I expect many users will use VS Code + Windows Terminal when developing on Windows, would it not be better to correlate these? The benefits are: 1. `>` means the same thing for both apps, which decreases cognitive load. 2. It is easier to press backspace to remove the `>` than it is to add the `>`. I.e. I think the `>` should instead mean "action mode" whilst no `>` will mean command line mode, according to https://devblogs.microsoft.com/commandline/windows-terminal-preview-1-3-release/ (see under "Command palette"). I realize this might have been discussed when implementing this, but in that case and if this issue is closed, it might serve as a reference to other users being confused by this unfortunate discrepancy.
Author
Owner

@zadjii-msft commented on GitHub (Oct 9, 2020):

Oh my gosh you're right, we did end up doing this backwards from VsCode.

I even had it called out in the spec to do it the other way: Cmd Palette Spec. That whole section is labeled with a bunch of "for discussion" tags, but I guess I never updated the spec to reflect the final decision-making point: https://github.com/microsoft/terminal/pull/5674#discussion_r427619170

I'm now doubly on board with > being the Commandline mode key, because that's exactly what Powertoys Run picked for their "commandline mode" (whatever they're calling it)

We're definitely in a weird place here - we already shipped the CmdPal with > as the Commandline Mode prefix, so I'm not sure that we could swap them now, though, I suppose all the 1.x releases are just previews of 2.0, and we still have some runway for breaking changes...

@zadjii-msft commented on GitHub (Oct 9, 2020): Oh my gosh you're right, we did end up doing this backwards from VsCode. I even had it called out in the spec to do it the other way: [Cmd Palette Spec](https://github.com/microsoft/terminal/blob/master/doc/specs/%232046%20-%20Command%20Palette.md#switching-between-modes). That whole section is labeled with a bunch of "for discussion" tags, but I guess I never updated the spec to reflect the final decision-making point: https://github.com/microsoft/terminal/pull/5674#discussion_r427619170 > I'm now doubly on board with `>` being the Commandline mode key, because that's exactly what Powertoys Run picked for their "commandline mode" (whatever they're calling it) We're definitely in a weird place here - we already shipped the CmdPal with `>` as the Commandline Mode prefix, so I'm not sure that we _could_ swap them now, though, I suppose all the 1.x releases are just previews of 2.0, and we still have _some_ runway for breaking changes...
Author
Owner

@thernstig commented on GitHub (Oct 9, 2020):

Glad I at least posted this then, and that it was an oversight. To make progress in the world of all that is coding, I do think a change is warranted and I am not sure many users would be angry if a change was made. The reason being that the default of pressing ctrl+shift+p would still by default end up in "action mode" just it it has the > in there, which is as I mentioned easy to delete with a backspace. It is much easier than adding > to go into "command line mode".

tldr; I think most users would find this an improvement (even if we do not take VS Code into account).

@thernstig commented on GitHub (Oct 9, 2020): Glad I at least posted this then, and that it was an oversight. To make progress in the world of all that is coding, I do think a change is warranted and I am not sure many users would be angry if a change was made. The reason being that the default of pressing `ctrl+shift+p` would still by default end up in "action mode" just it it has the `>` in there, which is as I mentioned easy to delete with a backspace. It is much easier than adding `>` to go into "command line mode". tldr; I think most users would find this an improvement (even if we do not take VS Code into account).
Author
Owner

@zadjii-msft commented on GitHub (Oct 9, 2020):

Summoning @DHowett, @cinnamon-msft. What do y'all think - do we follow PowerToys run, or VsCode?

@zadjii-msft commented on GitHub (Oct 9, 2020): Summoning @DHowett, @cinnamon-msft. What do y'all think - do we follow PowerToys run, or VsCode?
Author
Owner

@cinnamon-msft commented on GitHub (Oct 9, 2020):

If we start with >, would it say "Enter a wt commandline to run" or would it still list the available command options?

@cinnamon-msft commented on GitHub (Oct 9, 2020): If we start with `>`, would it say "Enter a wt commandline to run" or would it still list the available command options?
Author
Owner

@thernstig commented on GitHub (Oct 11, 2020):

It would list the available commad options. Exactly like in VS Code. (if the question was aimed at me)

@thernstig commented on GitHub (Oct 11, 2020): It would list the available commad options. Exactly like in VS Code. (if the question was aimed at me)
Author
Owner

@cinnamon-msft commented on GitHub (Oct 12, 2020):

Then I think we should follow VS Code for this. We've followed them for the key binding, might as well keep it going. :)

@cinnamon-msft commented on GitHub (Oct 12, 2020): Then I think we should follow VS Code for this. We've followed them for the key binding, might as well keep it going. :)
Author
Owner

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

Meh, let's just flip it. It starts with > by default, and > is "action search mode".

FWIW: VS Code doesn't have a commandline invocation mode, so there's no real parallel here.

How do other popular editors handle this? How about terminal emulators?

@DHowett commented on GitHub (Oct 12, 2020): Meh, let's just flip it. It starts with `>` by default, and `>` is "action search mode". FWIW: VS Code doesn't _have_ a commandline invocation mode, so there's no real parallel here. How do other popular editors handle this? How about terminal emulators?
Author
Owner

@thernstig commented on GitHub (Oct 13, 2020):

@DHowett

FWIW: VS Code doesn't have a commandline invocation mode, so there's no real parallel here.

That is true, but for what it is worth it has another mode (file mode) when the > is removed.

@thernstig commented on GitHub (Oct 13, 2020): @DHowett > FWIW: VS Code doesn't have a commandline invocation mode, so there's no real parallel here. That is true, but for what it is worth it has another mode (file mode) when the `>` is removed.
Author
Owner

@zadjii-msft commented on GitHub (Oct 13, 2020):

Thanks for the feedback y'all. I'll throw this on my 1.5 plate, so we don't ship the CmdPal with the original behavior for too long.

I'm not sure there's any other precedent for a command palette in other terminal emulators, so that's not really a factor here.

Sublime Text's "action mode" has no prefix, but also so does the "navigate to file" mode. They're just on separate keybinds. "Go to reference" (e.g. function name) is on the prefix @, from the "navigate to file" mode, and "go to line" is on :. Similar to VS Code, but I think the key difference is the ability to get to "action mode" with > in VS.

@zadjii-msft commented on GitHub (Oct 13, 2020): Thanks for the feedback y'all. I'll throw this on my 1.5 plate, so we don't ship the CmdPal with the original behavior for _too_ long. I'm not sure there's any other precedent for a command palette in other terminal emulators, so that's not really a factor here. Sublime Text's "action mode" has no prefix, but also so does the "navigate to file" mode. They're just on separate keybinds. "Go to reference" (e.g. function name) is on the prefix `@`, from the "navigate to file" mode, and "go to line" is on `:`. Similar to VS Code, but I think the key difference is the ability to get to "action mode" with `>` in VS.
Author
Owner

@zadjii-msft commented on GitHub (Oct 13, 2020):

Oof, this is a little trickier than just "flip the logic around" - we're going to have to fake out the placeholder text for action mode now, because it will have a literal > in the input, so XAML won't display the TextBox's PlaceholderText.

Annoying, but fixable.

@zadjii-msft commented on GitHub (Oct 13, 2020): Oof, this is a little trickier than just "flip the logic around" - we're going to have to fake out the placeholder text for action mode now, because it will have a literal `>` in the input, so XAML won't display the `TextBox`'s `PlaceholderText`. Annoying, but fixable.
Author
Owner

@ghost commented on GitHub (Nov 11, 2020):

:tada:This issue was addressed in #7935, which has now been successfully released as Windows Terminal Preview v1.5.3142.0.🎉

Handy links:

@ghost commented on GitHub (Nov 11, 2020): :tada:This issue was addressed in #7935, which has now been successfully released as `Windows Terminal Preview v1.5.3142.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.5.3142.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10769