Skip to content

Commit 9f8764a

Browse files
committed
Set description when contributing PYTHONSTARTUP
1 parent 0b477a3 commit 9f8764a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/client/common/utils/localize.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ 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');
202203
export const terminalDeactivateProgress = l10n.t('Editing {0}...');
203204
export const restartingTerminal = l10n.t('Restarting terminal and deactivating...');
204205
export const terminalDeactivatePrompt = l10n.t(

src/client/terminals/pythonStartup.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4-
import { ExtensionContext, Uri } from 'vscode';
4+
import { ExtensionContext, MarkdownString, Uri } from 'vscode';
55
import * as path from 'path';
66
import { copy, createDirectory, getConfiguration, onDidChangeConfiguration } from '../common/vscodeApis/workspaceApis';
77
import { EXTENSION_ROOT_DIR } from '../constants';
8+
import { Interpreters } from '../common/utils/localize';
89

910
async function applyPythonStartupSetting(context: ExtensionContext): Promise<void> {
1011
const config = getConfiguration('python');
@@ -23,6 +24,9 @@ async function applyPythonStartupSetting(context: ExtensionContext): Promise<voi
2324
context.environmentVariableCollection.replace('PYTHONSTARTUP', destPath.fsPath);
2425
// When shell integration is enabled, we disable PyREPL from cpython.
2526
context.environmentVariableCollection.replace('PYTHON_BASIC_REPL', '1');
27+
context.environmentVariableCollection.description = new MarkdownString(
28+
`${Interpreters.shellIntegrationEnvVarCollectionDescription} \`python.terminal.shellIntegration.enabled\``,
29+
);
2630
} else {
2731
context.environmentVariableCollection.delete('PYTHONSTARTUP');
2832
context.environmentVariableCollection.delete('PYTHON_BASIC_REPL');

0 commit comments

Comments
 (0)