Skip to content

Commit 86491ae

Browse files
committed
add one for delete
1 parent 8a72e76 commit 86491ae

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/client/common/utils/localize.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ export namespace Interpreters {
202202
export const shellIntegrationEnvVarCollectionDescription = l10n.t(
203203
'Enables `python.terminal.shellIntegration.enabled` by modifying `PYTHONSTARTUP` and `PYTHON_BASIC_REPL`',
204204
);
205+
export const shellIntegrationDisabledEnvVarCollectionDescription = l10n.t(
206+
'Disables `python.terminal.shellIntegration.enabled` by removing `PYTHONSTARTUP` and `PYTHON_BASIC_REPL`',
207+
);
205208
export const terminalDeactivateProgress = l10n.t('Editing {0}...');
206209
export const restartingTerminal = l10n.t('Restarting terminal and deactivating...');
207210
export const terminalDeactivatePrompt = l10n.t(

src/client/terminals/pythonStartup.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,18 @@ 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.description = new MarkdownString(
25-
Interpreters.shellIntegrationEnvVarCollectionDescription,
26-
);
2724
context.environmentVariableCollection.replace('PYTHONSTARTUP', destPath.fsPath);
2825
// When shell integration is enabled, we disable PyREPL from cpython.
2926
context.environmentVariableCollection.replace('PYTHON_BASIC_REPL', '1');
27+
context.environmentVariableCollection.description = new MarkdownString(
28+
Interpreters.shellIntegrationEnvVarCollectionDescription,
29+
);
3030
} else {
3131
context.environmentVariableCollection.delete('PYTHONSTARTUP');
3232
context.environmentVariableCollection.delete('PYTHON_BASIC_REPL');
33+
context.environmentVariableCollection.description = new MarkdownString(
34+
Interpreters.shellIntegrationDisabledEnvVarCollectionDescription,
35+
);
3336
}
3437
}
3538

0 commit comments

Comments
 (0)