Skip to content

History clipped to 1024? #135

@favorini

Description

@favorini

I'm using version 1.0.0.8, and when I load history from disk in my profile using Add-History and then load PSReadLine, my history seems to be clipped at 1024. Profile looks like this:

Import-Csv $HistoryPath | Select -Last $HistoryMaxCount | Add-History
Import-Module PSReadLine
Set-PSReadlineOption -EditMode Emacs
Set-PSReadlineOption -HistorySearchCursorMovesToEnd
Set-PSReadlineOption -MaximumHistoryCount $MaximumHistoryCount

MaximumHistoryCount is default 4096.

PS> Get-PSReadlineOption      #edited
EditMode                          : Emacs
AddToHistoryHandler               :
HistoryNoDuplicates               : False
MaximumHistoryCount               : 4096
HistorySearchCursorMovesToEnd     : True

PS> $MaximumHistoryCount
4096
PS> (Get-History).Count
4096

BeginningOfHistory only goes back 1024 commands. Same for ReverseSearchHistory. I can see commands farther back than 1024 in the PowerShell history, but searching PSReadLine history does not find them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions