From 4e5efa726f91f8975dfad554232927f4c699a368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabr=C3=ADcio=20Pinto=20Ferreira?= Date: Mon, 14 Aug 2023 09:28:52 -0300 Subject: [PATCH] feat: Create PreviousCommands.ps1 --- PreviousCommands.ps1 | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 PreviousCommands.ps1 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