Skip to content

Commit d8b59a9

Browse files
committed
better name
1 parent 60a5ef1 commit d8b59a9

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

Modules/Scripts/Get-HistoryEx.ps1

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,19 @@ Begin
2727
{
2828
if ($last -gt 0 -and $match -ne $null)
2929
{
30-
Get-Content -Last $last $hxPath | where { $_ -like "*$match*" } | foreach { FormatLine $_ } | more
30+
Get-Content -Last $last $savePath | where { $_ -like "*$match*" } | foreach { FormatLine $_ } | more
3131
}
3232
elseif ($last -gt 0)
3333
{
34-
Get-Content -Last $last $hxPath | foreach { FormatLine $_ } | more
34+
Get-Content -Last $last $savePath | foreach { FormatLine $_ } | more
3535
}
3636
elseif ($match -ne $null)
3737
{
38-
Get-Content $hxPath | where { $_ -like "*$match*" } | foreach { FormatLine $_ } | more
38+
Get-Content $savePath | where { $_ -like "*$match*" } | foreach { FormatLine $_ } | more
3939
}
4040
else
4141
{
42-
Get-Content $hxPath | foreach { FormatLine $_ } | more
42+
Get-Content $savePath | foreach { FormatLine $_ } | more
4343
}
4444
}
4545

@@ -72,11 +72,7 @@ Process
7272
elseif ($typnam -like 'Int*') { $script:last = $arg2 }
7373
}
7474

75-
$hxPath = (Get-PSReadlineOption).HistorySavePath
76-
Write-Host $hxPath -ForegroundColor Green
77-
Write-Host
78-
Write-Host ' Id CommandLine'
79-
Write-Host ' -- -----------'
75+
$script:savePath = (Get-PSReadlineOption).HistorySavePath
8076

8177
GetHistory
8278
}

0 commit comments

Comments
 (0)