Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow 'MaximumHistoryCount' to be set from user's profile #1869

Merged
merged 1 commit into from Oct 9, 2020

Conversation

daxian-dbw
Copy link
Member

@daxian-dbw daxian-dbw commented Oct 9, 2020

PR Summary

Fix #1781

Allow 'MaximumHistoryCount' to be set from user's profile.
Fix DelayedOneTimeInitialize() to initialize the MaximumHistoryCount only if it's not already defined (by user's profile, before ReadLine is called).

PR Checklist

  • PR has a meaningful title
    • Use the present tense and imperative mood when describing your changes
  • Summarized changes
  • Make sure you've added one or more new tests Not Applicable
  • User-facing changes
    • Not Applicable
    • OR
    • Documentation needed at PowerShell-Docs
      • Doc Issue filed:
Microsoft Reviewers: Open in CodeFlow

@daxian-dbw daxian-dbw requested a review from lzybkr October 9, 2020 17:31
@daxian-dbw daxian-dbw merged commit 219ffa1 into PowerShell:master Oct 9, 2020
@daxian-dbw daxian-dbw deleted the MaximumHistoryCount branch October 9, 2020 17:42
@axbender
Copy link

Having set both, $MaximumHistoryCount and readline's -MaximumHistoryCount doesn't work for a non-default -HistorySavePath; both values are set to 4096, yet the number of entries in the history file is bigger than 30000.

Versions:

  • PowerShell 7.4.0
  • PSReadline: 2.3.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set-PSReadlineOption -MaximumHistoryCount ignored in profile
3 participants