diff --git a/PreviousCommands.ps1 b/PreviousCommands.ps1 new file mode 100644 index 0000000..c06dbbb --- /dev/null +++ b/PreviousCommands.ps1 @@ -0,0 +1,7 @@ +function GetPreviousCommands($Total = 20) { + cat (Get-PSReadlineOption).HistorySavePath -Tail $Total +} + +Set-Alias -Name "cm-his" -Value GetPreviousCommands + +# Credits: https://stackoverflow.com/a/72307524/12542704