PowerShell的所有历史记录:
Get-Content (Get-PSReadLineOption).HistorySavePath
顺手写了一个掉用的函数:
function Get-AllHistory { $his = Get-Content (Get-PSReadLineOption).HistorySavePath $n = $his.Length $out = @() for($i=0;$i -lt $n;$i++) { $out = $out + "$i $($his[$i])" } return $out }