Last active
June 14, 2023 15:04
-
-
Save uyriq/934861bde232d004ad8732ce93c5e9c6 to your computer and use it in GitHub Desktop.
powershell get-history acts as bash history alike π
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get-history { | |
if ($args.Count -gt 0) { | |
Write-Output "$args" | |
$search="$($args[0])" | |
Get-Content (Get-PSReadlineOption).HistorySavePath | ? { $_ -Like "*$($search)*" } | |
} | |
Write-Output 'get-history acts like history' | |
Write-Output "$args" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment