Add "recent commands' to Command Palette in commandline mode #11447

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

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

Originally assigned to: @Don-Vito on GitHub.

Description of the new feature/enhancement

The idea is to store the history of the recent commands dispatched from command palette in command line mode. This history will be presented below the search bar. Typing in the search bar will filter the relevant history items (similar to the behavior we already have with filtering commands in action mode).

image

Usually when I use command palette in the command line mode I do it to run the same commands.
This feature will save me a lot of typing and prevent typos.

Proposed technical implementation details (optional)

I am not sure what is the best place to store the history, and what are the security concerns if exist.
We can start with storing the history in memory for the current session.

Originally created by @Don-Vito on GitHub (Nov 16, 2020). Originally assigned to: @Don-Vito on GitHub. # Description of the new feature/enhancement The idea is to store the history of the recent commands dispatched from command palette in command line mode. This history will be presented below the search bar. Typing in the search bar will filter the relevant history items (similar to the behavior we already have with filtering commands in action mode). ![image](https://user-images.githubusercontent.com/4639110/99311239-f5c37480-2864-11eb-8c2b-3b46e5ea66e8.png) <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> Usually when I use command palette in the command line mode I do it to run the same commands. This feature will save me a lot of typing and prevent typos. # Proposed technical implementation details (optional) I am not sure what is the best place to store the history, and what are the security concerns if exist. We can start with storing the history in memory for the current session. <!-- A clear and concise description of what you want to happen. -->
Author
Owner

@skyline75489 commented on GitHub (Nov 17, 2020):

I like this! VSCode will show recent commands history in its command palette and I found it useful.

@skyline75489 commented on GitHub (Nov 17, 2020): I like this! VSCode will show recent commands history in its command palette and I found it useful.
Author
Owner

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

dang this is a good idea

We could certainly start with work with just stashing the recently used commands in memory while a window is open, and then once #7972 is implemented, we could actually write the mru list to disk and load it from there.

I'll stick this in #5400. Thanks!

@zadjii-msft commented on GitHub (Nov 17, 2020): dang this is a good idea We could certainly start with work with just stashing the recently used commands in memory while a window is open, and then once #7972 is implemented, we could actually write the mru list to disk and load it from there. I'll stick this in #5400. Thanks!
Author
Owner

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

@zadjii-msft - then I would like to work on this 😊

@Don-Vito commented on GitHub (Nov 17, 2020): @zadjii-msft - then I would like to work on this 😊
Author
Owner

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

Go for it!

@zadjii-msft commented on GitHub (Nov 17, 2020): Go for it!
Author
Owner

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

Implemented in-memory, MRU list (not set) of 10 (hard-coded).
There is no auto-completion, the history entries get filtered out, however-to invoke the entry you need to select the item:
CommandHistory2

@Don-Vito commented on GitHub (Nov 18, 2020): Implemented in-memory, MRU list (not set) of 10 (hard-coded). There is no auto-completion, the history entries get filtered out, however-to invoke the entry you need to select the item: ![CommandHistory2](https://user-images.githubusercontent.com/4639110/99545851-78ac1280-29be-11eb-88de-3534da26c645.gif)
Author
Owner

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

:tada:This issue was addressed in #8317, 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 #8317, 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#11447