Make the Command Line Mode easier to access #11483

Closed
opened 2026-01-31 02:48:52 +00:00 by claunia · 6 comments
Owner

Originally created by @Don-Vito on GitHub (Nov 18, 2020).

Description of the new feature/enhancement

Today, to get to the command line mode I need to open the action mode and then to delete a ">" symbol, which is not very convenient.

While discussing this with @zadjii-msft few ideas were raised:

  1. Adding a separate binding for ToggleCommandPalette(mode=commandline)
  2. Having ToggleCommandPalette() switch between modes: closed->action->command line->closed.
  3. Both of them ☺️

Proposed technical implementation details (optional)

The most straightforward solution is to add an optional command palette mode to the ToggleCommandPalette, with two "launch modes": action and command line.

We will be able to implement option 2 only once https://github.com/microsoft/terminal/pull/8044 gets merged.

Originally created by @Don-Vito on GitHub (Nov 18, 2020). # Description of the new feature/enhancement Today, to get to the command line mode I need to open the action mode and then to delete a ">" symbol, which is not very convenient. While discussing this with @zadjii-msft few ideas were raised: 1. Adding a separate binding for ToggleCommandPalette(mode=commandline) 2. Having ToggleCommandPalette() switch between modes: closed->action->command line->closed. 3. Both of them ☺️ # Proposed technical implementation details (optional) The most straightforward solution is to add an optional command palette mode to the ToggleCommandPalette, with two "launch modes": action and command line. We will be able to implement option 2 only once https://github.com/microsoft/terminal/pull/8044 gets merged.
Author
Owner

@zadjii-msft commented on GitHub (Nov 18, 2020):

I'll be danged, I could have sworn I had already filed a task for this.

Ideas:

  • I don't really care that toggle with a mode might also close it. Maybe if you're in action mode, and you press the toggleCommandPalette(mode=commandline) keybinding, it'll pop you directly into commandline mode? (with #8044) (and vice versa)
  • Action and commandline mode definitely, tab search maybe? I suppose { action: toggleCommandPalette, mode: tabSearch } doesn't really make sense now does it.
@zadjii-msft commented on GitHub (Nov 18, 2020): I'll be danged, I could have sworn I had already filed a task for this. Ideas: * I don't really care that toggle with a mode might also close it. Maybe if you're in action mode, and you press the `toggleCommandPalette(mode=commandline)` keybinding, it'll pop you directly into commandline mode? (with #8044) (and vice versa) * Action and commandline mode definitely, tab search maybe? I suppose `{ action: toggleCommandPalette, mode: tabSearch }` doesn't _really_ make sense now does it.
Author
Owner

@DHowett commented on GitHub (Nov 18, 2020):

I'd say that the command palette being the backend for tab search is an implementation detail, not something to expose to the users 😄

@DHowett commented on GitHub (Nov 18, 2020): I'd say that the command palette being the backend for tab search is an implementation detail, not something to expose to the users :smile:
Author
Owner

@Don-Vito commented on GitHub (Nov 18, 2020):

I'll be danged, I could have sworn I had already filed a task for this.

Ideas:

* I don't really care that toggle with a mode might also close it. Maybe if you're in action mode, and you press the `toggleCommandPalette(mode=commandline)` keybinding, it'll pop you directly into commandline mode? (with #8044) (and vice versa)

* Action and commandline mode definitely, tab search maybe? I suppose `{ action: toggleCommandPalette, mode: tabSearch }` doesn't _really_ make sense now does it.

@zadjii-msft - I believe that:

  • toggleCommandPalette(mode=commandline) - should work from everywhere (even if the window is minimized and the PC is hibernated)
  • same for toggleCommandPalette(mode=commandline)
  • while toggleCommandPalette() with no mode specified should rotate through the modes (closed->action->command line).

WDYT?

@Don-Vito commented on GitHub (Nov 18, 2020): > > > I'll be danged, I could have sworn I had already filed a task for this. > > Ideas: > > * I don't really care that toggle with a mode might also close it. Maybe if you're in action mode, and you press the `toggleCommandPalette(mode=commandline)` keybinding, it'll pop you directly into commandline mode? (with #8044) (and vice versa) > > * Action and commandline mode definitely, tab search maybe? I suppose `{ action: toggleCommandPalette, mode: tabSearch }` doesn't _really_ make sense now does it. @zadjii-msft - I believe that: - toggleCommandPalette(mode=commandline) - should work from everywhere (even if the window is minimized and the PC is hibernated) - same for toggleCommandPalette(mode=commandline) - while toggleCommandPalette() with no mode specified should rotate through the modes (closed->action->command line). WDYT?
Author
Owner

@Don-Vito commented on GitHub (Nov 18, 2020):

I'd say that the command palette being the backend for tab search is an implementation detail, not something to expose to the users 😄

Yep.. that was a bad idea, especially since we already have a tabSeach binding...

@Don-Vito commented on GitHub (Nov 18, 2020): > > > I'd say that the command palette being the backend for tab search is an implementation detail, not something to expose to the users 😄 Yep.. that was a bad idea, especially since we already have a tabSeach binding...
Author
Owner

@Don-Vito commented on GitHub (Nov 23, 2020):

I'll be danged, I could have sworn I had already filed a task for this.

@zadjii-msft - I found it.. in the form of TODO 😆

 void TerminalPage::_HandleToggleCommandPalette(const IInspectable& /*sender*/,
                                                   const ActionEventArgs& args)
    {
        // TODO GH#6677: When we add support for commandline mode, first set the
        // mode that the command palette should be in, before making it visible.
        CommandPalette().EnableCommandPaletteMode();
        CommandPalette().Visibility(CommandPalette().Visibility() == Visibility::Visible ?
                                        Visibility::Collapsed :
                                        Visibility::Visible);
        args.Handled(true);
    }
@Don-Vito commented on GitHub (Nov 23, 2020): > > I'll be danged, I could have sworn I had already filed a task for this. > @zadjii-msft - I found it.. in the form of TODO 😆 ``` void TerminalPage::_HandleToggleCommandPalette(const IInspectable& /*sender*/, const ActionEventArgs& args) { // TODO GH#6677: When we add support for commandline mode, first set the // mode that the command palette should be in, before making it visible. CommandPalette().EnableCommandPaletteMode(); CommandPalette().Visibility(CommandPalette().Visibility() == Visibility::Visible ? Visibility::Collapsed : Visibility::Visible); args.Handled(true); } ```
Author
Owner

@ghost commented on GitHub (Jan 28, 2021):

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

Handy links:

@ghost commented on GitHub (Jan 28, 2021): :tada:This issue was addressed in #8382, which has now been successfully released as `Windows Terminal Preview v1.6.10272.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.6.10272.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#11483