File tree 5 files changed +16
-19
lines changed
5 files changed +16
-19
lines changed Original file line number Diff line number Diff line change 683
683
"default" : true ,
684
684
"description" : " Switches focus to the console when a script selection is run or a script file is debugged. This is an accessibility feature. To disable it, set to false."
685
685
},
686
+ "powershell.integratedConsole.useLegacyReadLine" : {
687
+ "type" : " boolean" ,
688
+ "default" : false ,
689
+ "description" : " Falls back to the legacy (lightweight) ReadLine experience. This will disable the use of PSReadLine in the PowerShell Integrated Console."
690
+ },
686
691
"powershell.debugging.createTemporaryIntegratedConsole" : {
687
692
"type" : " boolean" ,
688
693
"default" : false ,
Original file line number Diff line number Diff line change @@ -57,7 +57,11 @@ export class PowerShellProcess {
57
57
this . startArgs +=
58
58
`-LogPath '${ PowerShellProcess . escapeSingleQuotes ( editorServicesLogPath ) } ' ` +
59
59
`-SessionDetailsPath '${ PowerShellProcess . escapeSingleQuotes ( this . sessionFilePath ) } ' ` +
60
- `-FeatureFlags @(${ featureFlags } )` ;
60
+ `-FeatureFlags @(${ featureFlags } ) ` ;
61
+
62
+ if ( this . sessionSettings . integratedConsole . useLegacyReadLine ) {
63
+ this . startArgs += "-UseLegacyReadLine" ;
64
+ }
61
65
62
66
const powerShellArgs = [
63
67
"-NoProfile" ,
Original file line number Diff line number Diff line change @@ -406,7 +406,9 @@ export class SessionManager implements Middleware {
406
406
settings . developer . editorServicesLogLevel . toLowerCase ( ) !==
407
407
this . sessionSettings . developer . editorServicesLogLevel . toLowerCase ( ) ||
408
408
settings . developer . bundledModulesPath . toLowerCase ( ) !==
409
- this . sessionSettings . developer . bundledModulesPath . toLowerCase ( ) ) ) {
409
+ this . sessionSettings . developer . bundledModulesPath . toLowerCase ( ) ||
410
+ settings . integratedConsole . useLegacyReadLine !==
411
+ this . sessionSettings . integratedConsole . useLegacyReadLine ) ) {
410
412
411
413
vscode . window . showInformationMessage (
412
414
"The PowerShell runtime configuration has changed, would you like to start a new session?" ,
Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ export interface ISettings {
98
98
export interface IIntegratedConsoleSettings {
99
99
showOnStartup ?: boolean ;
100
100
focusConsoleOnExecute ?: boolean ;
101
+ useLegacyReadLine ?: boolean ;
101
102
}
102
103
103
104
export function load ( ) : ISettings {
@@ -118,14 +119,8 @@ export function load(): ISettings {
118
119
createTemporaryIntegratedConsole : false ,
119
120
} ;
120
121
121
- // TODO: Remove when PSReadLine is out of preview
122
- const featureFlags = [ ] ;
123
- if ( utils . isWindowsOS ( ) ) {
124
- featureFlags . push ( "PSReadLine" ) ;
125
- }
126
-
127
122
const defaultDeveloperSettings : IDeveloperSettings = {
128
- featureFlags,
123
+ featureFlags : [ ] ,
129
124
powerShellExePath : undefined ,
130
125
bundledModulesPath : "../../../PowerShellEditorServices/module" ,
131
126
editorServicesLogLevel : "Normal" ,
@@ -159,6 +154,7 @@ export function load(): ISettings {
159
154
const defaultIntegratedConsoleSettings : IIntegratedConsoleSettings = {
160
155
showOnStartup : true ,
161
156
focusConsoleOnExecute : true ,
157
+ useLegacyReadLine : false ,
162
158
} ;
163
159
164
160
return {
Original file line number Diff line number Diff line change @@ -10,16 +10,6 @@ suite("Settings module", () => {
10
10
assert . doesNotThrow ( Settings . load ) ;
11
11
} ) ;
12
12
13
- // TODO: Remove this test when PSReadLine is in stable
14
- test ( "PSReadLine featureFlag set correctly" , ( ) => {
15
- const settings : Settings . ISettings = Settings . load ( ) ;
16
- if ( process . platform === "win32" ) {
17
- assert . deepEqual ( settings . developer . featureFlags , [ "PSReadLine" ] ) ;
18
- } else {
19
- assert . deepEqual ( settings . developer . featureFlags , [ ] ) ;
20
- }
21
- } ) ;
22
-
23
13
test ( "Settings update correctly" , async ( ) => {
24
14
// then syntax
25
15
Settings . change ( "helpCompletion" , "BlockComment" , false ) . then ( ( ) =>
You can’t perform that action at this time.
0 commit comments