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

Permanently disable PSReadLine history #4521

Closed
1 task done
anissbenthami opened this issue Feb 16, 2025 · 3 comments
Closed
1 task done

Permanently disable PSReadLine history #4521

anissbenthami opened this issue Feb 16, 2025 · 3 comments
Labels
Resolution-Answered Question is answered

Comments

@anissbenthami
Copy link

Prerequisites

  • Write a descriptive title.

Description of the new feature/enhancement

The ability to completely disable command history is surprisingly missing. This is an essential option that should not only be implemented but also be the default.

Proposed technical implementation details (optional)

No response

@anissbenthami anissbenthami added the Issue-Enhancement It's a feature request. label Feb 16, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Feb 16, 2025
@daxian-dbw
Copy link
Member

daxian-dbw commented Feb 18, 2025

You can disable history simply by having Set-PSReadLineOption -HistorySaveStyle SaveNothing in your profile. We won't change to the default setting.

@daxian-dbw daxian-dbw added Resolution-Answered Question is answered and removed Issue-Enhancement It's a feature request. Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. labels Feb 18, 2025
@daxian-dbw daxian-dbw reopened this Feb 18, 2025
@anissbenthami
Copy link
Author

I would like to change the default location of my profile which is currently $PSHOME\Profile.ps1 on Windows to be somewhere close to the pwsh.exe folder so I can use it as portable on different machines.

@daxian-dbw
Copy link
Member

The default location of profile is the current-user current-host profile, not at $PSHOME\Profile.ps1. But you can already have your profile under $PSHOME next to pwsh, and that will your all-user all-host profile. See https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles?view=powershell-7.5#profile-types-and-locations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Answered Question is answered
Projects
None yet
Development

No branches or pull requests

2 participants