Save last commands when app is restarted (command history) #16318

Closed
opened 2026-01-31 05:03:57 +00:00 by claunia · 3 comments
Owner

Originally created by @WebTiger89 on GitHub (Dec 30, 2021).

Hi,
maybe this feature already exists but it would be great if last commands would be saved, e.g. when I drop some powershell commands, exit terminal and reopen it, last commands can be restored by pressing down key. Something like a command history.

Or does this already exist. Currently neither powershell profile nor command line profile saves the commands.

Originally created by @WebTiger89 on GitHub (Dec 30, 2021). Hi, maybe this feature already exists but it would be great if last commands would be saved, e.g. when I drop some powershell commands, exit terminal and reopen it, last commands can be restored by pressing down key. Something like a command history. Or does this already exist. Currently neither powershell profile nor command line profile saves the commands.
claunia added the Issue-QuestionNeeds-TriageNeeds-Tag-FixResolution-Answered labels 2026-01-31 05:03:58 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Dec 30, 2021):

PowerShell already does this, if you hit the up key, right? I believe that's provided by the PSReadline module. As much as I'd love to add that to cmd.exe, we won't be updating cmd.exe anytime soon. If you want a modern, updated shell on Windows, you should try out PowerShell 7.

@zadjii-msft commented on GitHub (Dec 30, 2021): PowerShell already does this, if you hit the up key, right? I believe that's provided by the PSReadline module. As much as I'd love to add that to `cmd.exe`, [we won't be updating `cmd.exe` anytime soon](https://github.com/microsoft/terminal/blob/main/doc/Niksa.md#cmd). If you want a modern, updated shell on Windows, you should try out [PowerShell 7](https://github.com/PowerShell/PowerShell).
Author
Owner

@WebTiger89 commented on GitHub (Dec 30, 2021):

ah ok this is a feature of the shell and not the console? If yes, iam fine. You can close this issue :)

@WebTiger89 commented on GitHub (Dec 30, 2021): ah ok this is a feature of the shell and not the console? If yes, iam fine. You can close this issue :)
Author
Owner

@zadjii-msft commented on GitHub (Jan 3, 2022):

Yep, this is a feature of the shell.

@zadjii-msft commented on GitHub (Jan 3, 2022): Yep, this is a feature of the shell.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16318