Skip to content

Commit

Permalink
feat: Create PreviousCommands.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
pferreirafabricio authored Aug 14, 2023
1 parent 91f4383 commit 4e5efa7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions PreviousCommands.ps1
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4e5efa7

Please sign in to comment.