-
Notifications
You must be signed in to change notification settings - Fork 223
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
Graduate PSReadLine feature and add UseLegacyReadLine #1076
Graduate PSReadLine feature and add UseLegacyReadLine #1076
Conversation
// We also want it if we are either: | ||
// * On Windows on any version OR | ||
// * On Linux or macOS on any version greater than or equal to 7 | ||
var shouldUsePSReadLine = enableConsoleRepl && !useLegacyReadLine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var shouldUsePSReadLine = enableConsoleRepl && !useLegacyReadLine | |
bool shouldUsePSReadLine = enableConsoleRepl && !useLegacyReadLine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed!
// * On Windows on any version OR | ||
// * On Linux or macOS on any version greater than or equal to 7 | ||
var shouldUsePSReadLine = enableConsoleRepl && !useLegacyReadLine | ||
&& (VersionUtils.IsWindows || (!VersionUtils.IsWindows && !VersionUtils.IsPS6)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't (IsWindows || (!IsWindows && IsPS6)
be the same as (IsWindows || !IsPS6)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call - fixed!
// Stdio server can't support an integrated console so we pass in false. | ||
// Stdio server can't support an integrated console so we pass in false for | ||
// enableConsoleRepl and useLegacyReadLine. | ||
false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible to use named args here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
Hopefully we can slightly reduce the number of files a change like this touches in the binary cmdlet refactor! |
This stops checking for PSReadLine feature flag in the feature flags passed in.
Instead, it plumbs a
UseLegacyReadLine
parameter which allows the ability to force using the Legacy ReadLine experience (for situations like accessibility that require removing PSRL).I have a separate PR on the vscode-powershell side taking advantage of this here: PowerShell/vscode-powershell#2262