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

Change PYTHONSTARTUP setting name to Python.terminal.shell integration.enabled #24153

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -658,9 +658,9 @@
"scope": "resource",
"type": "array"
},
"python.REPL.enableShellIntegration": {
"python.terminal.shellIntegration.enabled": {
"default": false,
"description": "%python.REPL.enableShellIntegration.description%",
"description": "%python.terminal.shellIntegration.enabled.description%",
"scope": "resource",
"type": "boolean"
},
Expand Down
2 changes: 1 addition & 1 deletion package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@
"python.pixiToolPath.description": "Path to the pixi executable.",
"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.",
"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.",
"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.",
"python.tensorBoard.logDirectory.description": "Set this setting to your preferred TensorBoard log directory to skip log directory prompt when starting TensorBoard.",
"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`.",
"python.tensorBoard.logDirectory.deprecationMessage": "Tensorboard support has been moved to the extension Tensorboard extension. Instead use the setting `tensorBoard.logDirectory`.",
"python.terminal.shellIntegration.enabled.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.",
anthonykim1 marked this conversation as resolved.
Show resolved Hide resolved
"python.terminal.activateEnvInCurrentTerminal.description": "Activate Python Environment in the current Terminal on load of the Extension.",
"python.terminal.activateEnvironment.description": "Activate Python Environment in all Terminals created.",
"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.",
Expand Down
1 change: 1 addition & 0 deletions src/client/common/configSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ export class PythonSettings implements IPythonSettings {
launchArgs: [],
activateEnvironment: true,
activateEnvInCurrentTerminal: false,
enableShellIntegration: false,
};

this.REPL = pythonSettings.get<IREPLSettings>('REPL')!;
Expand Down
2 changes: 1 addition & 1 deletion src/client/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,12 @@ export interface ITerminalSettings {
readonly launchArgs: string[];
readonly activateEnvironment: boolean;
readonly activateEnvInCurrentTerminal: boolean;
readonly enableShellIntegration: boolean;
}

export interface IREPLSettings {
readonly enableREPLSmartSend: boolean;
readonly sendToNativeREPL: boolean;
readonly enableShellIntegration: boolean;
}

export interface IExperiments {
Expand Down
2 changes: 1 addition & 1 deletion src/client/terminals/pythonStartup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { EXTENSION_ROOT_DIR } from '../constants';

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

if (pythonrcSetting) {
const storageUri = context.storageUri || context.globalStorageUri;
Expand Down
1 change: 0 additions & 1 deletion src/test/terminals/codeExecution/helper.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ suite('Terminal - Code Execution Helper', () => {
enableREPLSmartSend: false,
REPLSmartSend: false,
sendToNativeREPL: false,
enableShellIntegration: true,
}));
configurationService.setup((x) => x.getSettings(TypeMoq.It.isAny())).returns(() => pythonSettings.object);
configurationService
Expand Down
1 change: 0 additions & 1 deletion src/test/terminals/codeExecution/smartSend.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ suite('REPL - Smart Send', () => {
enableREPLSmartSend: true,
REPLSmartSend: true,
sendToNativeREPL: false,
enableShellIntegration: true,
}));

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