support sudo !!
to run the last command
#6
Labels
Issue-Feature
New feature or request. Complex enough to require planning and actual budgeted, scheduled work.
This is shockingly trivial for CMD.exe. CMD uses the built-in console line-editing, which means that commands run in CMD will use the console's own history buffer. That means
sudo
can just get the console history withGetConsoleCommandHistory
1, to find the last run command.PowerShell, on the other hand, uses PsReadline in the default configuration. That means we'll need the
sudo
powershell module (#6) to supportsudo !!
from powershell.Footnotes
Is this actually a private API or just an undocumented one? That's not super clear to me looking at https://github.com/microsoft/terminal/blob/ef96e225da6b0df496390eed9fe31dc7e434a939/src/server/ApiSorter.cpp#L109 ↩
The text was updated successfully, but these errors were encountered: