Skip to content

Set-PSReadlineOption -MaximumHistoryCount in PowerShell profile does not set correctly #1309

Open
@DoCode

Description

@DoCode

Environment

PS version: 7.0.0-rc.2
PSReadline version: 2.0.0-rc2'; ProjectUri = 'https://github.com/PowerShell/PSReadLine
os: 10.0.18362.1 (WinBuild.160101.0800)
PS file version: 7.0.0.0
HostName: ConsoleHost
BufferWidth: 136
BufferHeight: 9000

Steps to reproduce

Set the MaximumHistoryCount in the PowerShell profile:

Import-Module PSReadLine
Set-PSReadlineOption -MaximumHistoryCount 100

Expected behavior

Get the MaximumHistoryCount in a started session:

Get-PSReadLineOption | select MaximumHistoryCount

MaximumHistoryCount
-------------------
                100

Actual behavior

Get the MaximumHistoryCount in a started session:

Get-PSReadLineOption | select MaximumHistoryCount

MaximumHistoryCount
-------------------
               4096

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-HistoryImprovementsLabel for tracking different improvements to historyIssue-BugIt either shouldn't be doing this or needs an investigation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions