Skip to content

Commit 8a72e76

Browse files
committed
Modify
1 parent 9f8764a commit 8a72e76

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/client/common/utils/localize.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,9 @@ export namespace Interpreters {
199199
export const terminalEnvVarCollectionPrompt = l10n.t(
200200
'{0} environment was successfully activated, even though {1} indicator may not be present in the terminal prompt. [Learn more](https://aka.ms/vscodePythonTerminalActivation).',
201201
);
202-
export const shellIntegrationEnvVarCollectionDescription = l10n.t('Enables Python shell integration via');
202+
export const shellIntegrationEnvVarCollectionDescription = l10n.t(
203+
'Enables `python.terminal.shellIntegration.enabled` by modifying `PYTHONSTARTUP` and `PYTHON_BASIC_REPL`',
204+
);
203205
export const terminalDeactivateProgress = l10n.t('Editing {0}...');
204206
export const restartingTerminal = l10n.t('Restarting terminal and deactivating...');
205207
export const terminalDeactivatePrompt = l10n.t(

src/client/terminals/pythonStartup.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ async function applyPythonStartupSetting(context: ExtensionContext): Promise<voi
2121
const destPath = Uri.joinPath(storageUri, 'pythonrc.py');
2222
const sourcePath = path.join(EXTENSION_ROOT_DIR, 'python_files', 'pythonrc.py');
2323
await copy(Uri.file(sourcePath), destPath, { overwrite: true });
24-
context.environmentVariableCollection.replace('PYTHONSTARTUP', destPath.fsPath);
25-
// When shell integration is enabled, we disable PyREPL from cpython.
26-
context.environmentVariableCollection.replace('PYTHON_BASIC_REPL', '1');
2724
context.environmentVariableCollection.description = new MarkdownString(
28-
`${Interpreters.shellIntegrationEnvVarCollectionDescription} \`python.terminal.shellIntegration.enabled\``,
25+
Interpreters.shellIntegrationEnvVarCollectionDescription,
2926
);
27+
context.environmentVariableCollection.replace('PYTHONSTARTUP', destPath.fsPath);
28+
// When shell integration is enabled, we disable PyREPL from cpython.
29+
context.environmentVariableCollection.replace('PYTHON_BASIC_REPL', '1');
3030
} else {
3131
context.environmentVariableCollection.delete('PYTHONSTARTUP');
3232
context.environmentVariableCollection.delete('PYTHON_BASIC_REPL');

0 commit comments

Comments
 (0)