Skip to content

Commit f8b861a

Browse files
anthonykim1Tyriar
andauthored
Change PYTHONSTARTUP setting name to Python.terminal.shell integration.enabled (#24153)
Resolves: #24143 /cc @cwebster-99 @Tyriar --------- Co-authored-by: Daniel Imms <[email protected]>
1 parent af2aa6e commit f8b861a

File tree

7 files changed

+6
-7
lines changed

7 files changed

+6
-7
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,9 +658,9 @@
658658
"scope": "resource",
659659
"type": "array"
660660
},
661-
"python.REPL.enableShellIntegration": {
661+
"python.terminal.shellIntegration.enabled": {
662662
"default": false,
663-
"description": "%python.REPL.enableShellIntegration.description%",
663+
"description": "%python.terminal.shellIntegration.enabled.description%",
664664
"scope": "resource",
665665
"type": "boolean",
666666
"tags": [

package.nls.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@
6565
"python.pixiToolPath.description": "Path to the pixi executable.",
6666
"python.EnableREPLSmartSend.description": "Toggle Smart Send for the Python REPL. Smart Send enables sending the smallest runnable block of code to the REPL on Shift+Enter and moves the cursor accordingly.",
6767
"python.REPL.sendToNativeREPL.description": "Toggle to send code to Python REPL instead of the terminal on execution. Turning this on will change the behavior for both Smart Send and Run Selection/Line in the Context Menu.",
68-
"python.REPL.enableShellIntegration.description": "Enable Shell Integration for Python Terminal REPL. Shell Integration enhances the terminal experience by allowing command decorations, run recent command, and improving accessibility for Python REPL in the terminal.",
6968
"python.tensorBoard.logDirectory.description": "Set this setting to your preferred TensorBoard log directory to skip log directory prompt when starting TensorBoard.",
7069
"python.tensorBoard.logDirectory.markdownDeprecationMessage": "Tensorboard support has been moved to the extension [Tensorboard extension](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.tensorboard). Instead use the setting `tensorBoard.logDirectory`.",
7170
"python.tensorBoard.logDirectory.deprecationMessage": "Tensorboard support has been moved to the extension Tensorboard extension. Instead use the setting `tensorBoard.logDirectory`.",
71+
"python.terminal.shellIntegration.enabled.description": "Enable [shell integration](https://code.visualstudio.com/docs/terminal/shell-integration) for the terminals running python. Shell integration enhances the terminal experience by enabling command decorations, run recent command, improving accessibility among other things.",
7272
"python.terminal.activateEnvInCurrentTerminal.description": "Activate Python Environment in the current Terminal on load of the Extension.",
7373
"python.terminal.activateEnvironment.description": "Activate Python Environment in all Terminals created.",
7474
"python.terminal.executeInFileDir.description": "When executing a file in the terminal, whether to use execute in the file's directory, instead of the current open folder.",

src/client/common/configSettings.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ export class PythonSettings implements IPythonSettings {
368368
launchArgs: [],
369369
activateEnvironment: true,
370370
activateEnvInCurrentTerminal: false,
371+
enableShellIntegration: false,
371372
};
372373

373374
this.REPL = pythonSettings.get<IREPLSettings>('REPL')!;

src/client/common/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,12 @@ export interface ITerminalSettings {
197197
readonly launchArgs: string[];
198198
readonly activateEnvironment: boolean;
199199
readonly activateEnvInCurrentTerminal: boolean;
200+
readonly enableShellIntegration: boolean;
200201
}
201202

202203
export interface IREPLSettings {
203204
readonly enableREPLSmartSend: boolean;
204205
readonly sendToNativeREPL: boolean;
205-
readonly enableShellIntegration: boolean;
206206
}
207207

208208
export interface IExperiments {

src/client/terminals/pythonStartup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { EXTENSION_ROOT_DIR } from '../constants';
88

99
export async function registerPythonStartup(context: ExtensionContext): Promise<void> {
1010
const config = getConfiguration('python');
11-
const pythonrcSetting = config.get<boolean>('REPL.enableShellIntegration');
11+
const pythonrcSetting = config.get<boolean>('terminal.shellIntegration.enabled');
1212

1313
if (pythonrcSetting) {
1414
const storageUri = context.storageUri || context.globalStorageUri;

src/test/terminals/codeExecution/helper.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ suite('Terminal - Code Execution Helper', () => {
116116
enableREPLSmartSend: false,
117117
REPLSmartSend: false,
118118
sendToNativeREPL: false,
119-
enableShellIntegration: true,
120119
}));
121120
configurationService.setup((x) => x.getSettings(TypeMoq.It.isAny())).returns(() => pythonSettings.object);
122121
configurationService

src/test/terminals/codeExecution/smartSend.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ suite('REPL - Smart Send', () => {
113113
enableREPLSmartSend: true,
114114
REPLSmartSend: true,
115115
sendToNativeREPL: false,
116-
enableShellIntegration: true,
117116
}));
118117

119118
configurationService.setup((x) => x.getSettings(TypeMoq.It.isAny())).returns(() => pythonSettings.object);

0 commit comments

Comments
 (0)