Skip to content

Commit

Permalink
Append history to dummy file for compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Namorzyny authored Dec 4, 2023
1 parent 129ace1 commit 749abe1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mcfly.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ $null = New-Module mcfly {
# Get history file and make a dummy file for psreadline (hopefully after it has loaded the real history file to its in memory history)
$env:HISTFILE = $null -eq $env:HISTFILE -or "" -eq $env:HISTFILE ? (Get-PSReadLineOption).HistorySavePath : $env:HISTFILE;
$psreadline_dummy = New-TemporaryFile
# Append history to dummy file for compatibility
Get-Content -Path $Env:HISTFILE | Out-File -FilePath $psreadline_dummy -Force
Set-PSReadLineOption -HistorySavePath $psreadline_dummy.FullName


Expand Down

0 comments on commit 749abe1

Please sign in to comment.