Skip to content

Commit e3f0f4a

Browse files
authored
Merge pull request microsoft#184743 from microsoft/tyriar/183423
Remove deprecated shell/shellArgs/automationShell settings
2 parents b07469d + 64a8362 commit e3f0f4a

File tree

11 files changed

+29
-451
lines changed

11 files changed

+29
-451
lines changed

src/vs/platform/terminal/common/terminal.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,15 @@ import { IWorkspaceFolder } from 'vs/platform/workspace/common/workspace';
1717
export const terminalTabFocusContextKey = new RawContextKey<boolean>('terminalTabFocusMode', false, true);
1818

1919
export const enum TerminalSettingPrefix {
20-
Shell = 'terminal.integrated.shell.',
21-
ShellArgs = 'terminal.integrated.shellArgs.',
2220
DefaultProfile = 'terminal.integrated.defaultProfile.',
2321
Profiles = 'terminal.integrated.profiles.'
2422
}
2523

2624
export const enum TerminalSettingId {
27-
ShellLinux = 'terminal.integrated.shell.linux',
28-
ShellMacOs = 'terminal.integrated.shell.osx',
29-
ShellWindows = 'terminal.integrated.shell.windows',
3025
SendKeybindingsToShell = 'terminal.integrated.sendKeybindingsToShell',
31-
AutomationShellLinux = 'terminal.integrated.automationShell.linux',
32-
AutomationShellMacOs = 'terminal.integrated.automationShell.osx',
33-
AutomationShellWindows = 'terminal.integrated.automationShell.windows',
3426
AutomationProfileLinux = 'terminal.integrated.automationProfile.linux',
3527
AutomationProfileMacOs = 'terminal.integrated.automationProfile.osx',
3628
AutomationProfileWindows = 'terminal.integrated.automationProfile.windows',
37-
ShellArgsLinux = 'terminal.integrated.shellArgs.linux',
38-
ShellArgsMacOs = 'terminal.integrated.shellArgs.osx',
39-
ShellArgsWindows = 'terminal.integrated.shellArgs.windows',
4029
ProfilesWindows = 'terminal.integrated.profiles.windows',
4130
ProfilesMacOs = 'terminal.integrated.profiles.osx',
4231
ProfilesLinux = 'terminal.integrated.profiles.linux',

src/vs/platform/terminal/common/terminalPlatformConfiguration.ts

Lines changed: 5 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -108,52 +108,15 @@ function createTerminalProfileMarkdownDescription(platform: Platform.Linux | Pla
108108
);
109109
}
110110

111-
const shellDeprecationMessageLinux = localize('terminal.integrated.shell.linux.deprecation', "This is deprecated, the new recommended way to configure your default shell is by creating a terminal profile in {0} and setting its profile name as the default in {1}. This will currently take priority over the new profiles settings but that will change in the future.", '`#terminal.integrated.profiles.linux#`', '`#terminal.integrated.defaultProfile.linux#`');
112-
const shellDeprecationMessageOsx = localize('terminal.integrated.shell.osx.deprecation', "This is deprecated, the new recommended way to configure your default shell is by creating a terminal profile in {0} and setting its profile name as the default in {1}. This will currently take priority over the new profiles settings but that will change in the future.", '`#terminal.integrated.profiles.osx#`', '`#terminal.integrated.defaultProfile.osx#`');
113-
const shellDeprecationMessageWindows = localize('terminal.integrated.shell.windows.deprecation', "This is deprecated, the new recommended way to configure your default shell is by creating a terminal profile in {0} and setting its profile name as the default in {1}. This will currently take priority over the new profiles settings but that will change in the future.", '`#terminal.integrated.profiles.windows#`', '`#terminal.integrated.defaultProfile.windows#`');
114-
const automationShellDeprecationMessageLinux = localize('terminal.integrated.automationShell.linux.deprecation', "This is deprecated, the new recommended way to configure your automation shell is by creating a terminal automation profile with {0}. This will currently take priority over the new automation profile settings but that will change in the future.", '`#terminal.integrated.automationProfile.linux#`');
115-
const automationShellDeprecationMessageOsx = localize('terminal.integrated.automationShell.osx.deprecation', "This is deprecated, the new recommended way to configure your automation shell is by creating a terminal automation profile with {0}. This will currently take priority over the new automation profile settings but that will change in the future.", '`#terminal.integrated.automationProfile.osx#`');
116-
const automationShellDeprecationMessageWindows = localize('terminal.integrated.automationShell.windows.deprecation', "This is deprecated, the new recommended way to configure your automation shell is by creating a terminal automation profile with {0}. This will currently take priority over the new automation profile settings but that will change in the future.", '`#terminal.integrated.automationProfile.windows#`');
117-
118111
const terminalPlatformConfiguration: IConfigurationNode = {
119112
id: 'terminal',
120113
order: 100,
121114
title: localize('terminalIntegratedConfigurationTitle', "Integrated Terminal"),
122115
type: 'object',
123116
properties: {
124-
[TerminalSettingId.AutomationShellLinux]: {
125-
restricted: true,
126-
markdownDescription: localize({
127-
key: 'terminal.integrated.automationShell.linux',
128-
comment: ['{0} and {1} are the `shell` and `shellArgs` settings keys']
129-
}, "A path that when set will override {0} and ignore {1} values for automation-related terminal usage like tasks and debug.", '`terminal.integrated.shell.linux`', '`shellArgs`'),
130-
type: ['string', 'null'],
131-
default: null,
132-
markdownDeprecationMessage: automationShellDeprecationMessageLinux
133-
},
134-
[TerminalSettingId.AutomationShellMacOs]: {
135-
restricted: true,
136-
markdownDescription: localize({
137-
key: 'terminal.integrated.automationShell.osx',
138-
comment: ['{0} and {1} are the `shell` and `shellArgs` settings keys']
139-
}, "A path that when set will override {0} and ignore {1} values for automation-related terminal usage like tasks and debug.", '`terminal.integrated.shell.osx`', '`shellArgs`'),
140-
type: ['string', 'null'],
141-
default: null,
142-
markdownDeprecationMessage: automationShellDeprecationMessageOsx
143-
},
144-
[TerminalSettingId.AutomationShellWindows]: {
145-
restricted: true,
146-
markdownDescription: localize({
147-
key: 'terminal.integrated.automationShell.windows',
148-
comment: ['{0} and {1} are the `shell` and `shellArgs` settings keys']
149-
}, "A path that when set will override {0} and ignore {1} values for automation-related terminal usage like tasks and debug.", '`terminal.integrated.shell.windows`', '`shellArgs`'),
150-
type: ['string', 'null'],
151-
default: null,
152-
markdownDeprecationMessage: automationShellDeprecationMessageWindows
153-
},
154117
[TerminalSettingId.AutomationProfileLinux]: {
155118
restricted: true,
156-
markdownDescription: localize('terminal.integrated.automationProfile.linux', "The terminal profile to use on Linux for automation-related terminal usage like tasks and debug. This setting will currently be ignored if {0} (now deprecated) is set.", '`terminal.integrated.automationShell.linux`'),
119+
markdownDescription: localize('terminal.integrated.automationProfile.linux', "The terminal profile to use on Linux for automation-related terminal usage like tasks and debug."),
157120
type: ['object', 'null'],
158121
default: null,
159122
'anyOf': [
@@ -171,7 +134,7 @@ const terminalPlatformConfiguration: IConfigurationNode = {
171134
},
172135
[TerminalSettingId.AutomationProfileMacOs]: {
173136
restricted: true,
174-
markdownDescription: localize('terminal.integrated.automationProfile.osx', "The terminal profile to use on macOS for automation-related terminal usage like tasks and debug. This setting will currently be ignored if {0} (now deprecated) is set.", '`terminal.integrated.automationShell.osx`'),
137+
markdownDescription: localize('terminal.integrated.automationProfile.osx', "The terminal profile to use on macOS for automation-related terminal usage like tasks and debug."),
175138
type: ['object', 'null'],
176139
default: null,
177140
'anyOf': [
@@ -205,69 +168,6 @@ const terminalPlatformConfiguration: IConfigurationNode = {
205168
}
206169
]
207170
},
208-
[TerminalSettingId.ShellLinux]: {
209-
restricted: true,
210-
markdownDescription: localize('terminal.integrated.shell.linux', "The path of the shell that the terminal uses on Linux. [Read more about configuring the shell](https://code.visualstudio.com/docs/editor/integrated-terminal#_terminal-profiles)."),
211-
type: ['string', 'null'],
212-
default: null,
213-
markdownDeprecationMessage: shellDeprecationMessageLinux
214-
},
215-
[TerminalSettingId.ShellMacOs]: {
216-
restricted: true,
217-
markdownDescription: localize('terminal.integrated.shell.osx', "The path of the shell that the terminal uses on macOS. [Read more about configuring the shell](https://code.visualstudio.com/docs/editor/integrated-terminal#_terminal-profiles)."),
218-
type: ['string', 'null'],
219-
default: null,
220-
markdownDeprecationMessage: shellDeprecationMessageOsx
221-
},
222-
[TerminalSettingId.ShellWindows]: {
223-
restricted: true,
224-
markdownDescription: localize('terminal.integrated.shell.windows', "The path of the shell that the terminal uses on Windows. [Read more about configuring the shell](https://code.visualstudio.com/docs/editor/integrated-terminal#_terminal-profiles)."),
225-
type: ['string', 'null'],
226-
default: null,
227-
markdownDeprecationMessage: shellDeprecationMessageWindows
228-
},
229-
[TerminalSettingId.ShellArgsLinux]: {
230-
restricted: true,
231-
markdownDescription: localize('terminal.integrated.shellArgs.linux', "The command line arguments to use when on the Linux terminal. [Read more about configuring the shell](https://code.visualstudio.com/docs/editor/integrated-terminal#_terminal-profiles)."),
232-
type: 'array',
233-
items: {
234-
type: 'string'
235-
},
236-
default: [],
237-
markdownDeprecationMessage: shellDeprecationMessageLinux
238-
},
239-
[TerminalSettingId.ShellArgsMacOs]: {
240-
restricted: true,
241-
markdownDescription: localize('terminal.integrated.shellArgs.osx', "The command line arguments to use when on the macOS terminal. [Read more about configuring the shell](https://code.visualstudio.com/docs/editor/integrated-terminal#_terminal-profiles)."),
242-
type: 'array',
243-
items: {
244-
type: 'string'
245-
},
246-
// Unlike on Linux, ~/.profile is not sourced when logging into a macOS session. This
247-
// is the reason terminals on macOS typically run login shells by default which set up
248-
// the environment. See http://unix.stackexchange.com/a/119675/115410
249-
default: ['-l'],
250-
markdownDeprecationMessage: shellDeprecationMessageOsx
251-
},
252-
[TerminalSettingId.ShellArgsWindows]: {
253-
restricted: true,
254-
markdownDescription: localize('terminal.integrated.shellArgs.windows', "The command line arguments to use when on the Windows terminal. [Read more about configuring the shell](https://code.visualstudio.com/docs/editor/integrated-terminal#_terminal-profiles)."),
255-
'anyOf': [
256-
{
257-
type: 'array',
258-
items: {
259-
type: 'string',
260-
markdownDescription: localize('terminal.integrated.shellArgs.windows', "The command line arguments to use when on the Windows terminal. [Read more about configuring the shell](https://code.visualstudio.com/docs/editor/integrated-terminal#_terminal-profiles).")
261-
},
262-
},
263-
{
264-
type: 'string',
265-
markdownDescription: localize('terminal.integrated.shellArgs.windows.string', "The command line arguments in [command-line format](https://msdn.microsoft.com/en-au/08dfcab2-eb6e-49a4-80eb-87d4076c98c6) to use when on the Windows terminal. [Read more about configuring the shell](https://code.visualstudio.com/docs/editor/integrated-terminal#_terminal-profiles).")
266-
}
267-
],
268-
default: [],
269-
markdownDeprecationMessage: shellDeprecationMessageWindows
270-
},
271171
[TerminalSettingId.ProfilesWindows]: {
272172
restricted: true,
273173
markdownDescription: createTerminalProfileMarkdownDescription(Platform.Windows),
@@ -495,23 +395,23 @@ export function registerTerminalDefaultProfileConfiguration(detectedProfiles?: {
495395
properties: {
496396
[TerminalSettingId.DefaultProfileLinux]: {
497397
restricted: true,
498-
markdownDescription: localize('terminal.integrated.defaultProfile.linux', "The default profile used on Linux. This setting will currently be ignored if either {0} or {1} are set.", '`terminal.integrated.shell.linux`', '`terminal.integrated.shellArgs.linux`'),
398+
markdownDescription: localize('terminal.integrated.defaultProfile.linux', "The default terminal profile on Linux."),
499399
type: ['string', 'null'],
500400
default: null,
501401
enum: detectedProfiles?.os === OperatingSystem.Linux ? profileEnum?.values : undefined,
502402
markdownEnumDescriptions: detectedProfiles?.os === OperatingSystem.Linux ? profileEnum?.markdownDescriptions : undefined
503403
},
504404
[TerminalSettingId.DefaultProfileMacOs]: {
505405
restricted: true,
506-
markdownDescription: localize('terminal.integrated.defaultProfile.osx', "The default profile used on macOS. This setting will currently be ignored if either {0} or {1} are set.", '`terminal.integrated.shell.osx`', '`terminal.integrated.shellArgs.osx`'),
406+
markdownDescription: localize('terminal.integrated.defaultProfile.osx', "The default terminal profile on macOS."),
507407
type: ['string', 'null'],
508408
default: null,
509409
enum: detectedProfiles?.os === OperatingSystem.Macintosh ? profileEnum?.values : undefined,
510410
markdownEnumDescriptions: detectedProfiles?.os === OperatingSystem.Macintosh ? profileEnum?.markdownDescriptions : undefined
511411
},
512412
[TerminalSettingId.DefaultProfileWindows]: {
513413
restricted: true,
514-
markdownDescription: localize('terminal.integrated.defaultProfile.windows', "The default profile used on Windows. This setting will currently be ignored if either {0} or {1} are set.", '`terminal.integrated.shell.windows`', '`terminal.integrated.shellArgs.windows`'),
414+
markdownDescription: localize('terminal.integrated.defaultProfile.windows', "The default terminal profile on Windows."),
515415
type: ['string', 'null'],
516416
default: null,
517417
enum: detectedProfiles?.os === OperatingSystem.Windows ? profileEnum?.values : undefined,

src/vs/platform/terminal/common/terminalProcess.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,6 @@ export interface ISingleTerminalConfiguration<T> {
1414
}
1515

1616
export interface ICompleteTerminalConfiguration {
17-
'terminal.integrated.automationShell.windows': ISingleTerminalConfiguration<string | string[]>;
18-
'terminal.integrated.automationShell.osx': ISingleTerminalConfiguration<string | string[]>;
19-
'terminal.integrated.automationShell.linux': ISingleTerminalConfiguration<string | string[]>;
20-
'terminal.integrated.shell.windows': ISingleTerminalConfiguration<string | string[]>;
21-
'terminal.integrated.shell.osx': ISingleTerminalConfiguration<string | string[]>;
22-
'terminal.integrated.shell.linux': ISingleTerminalConfiguration<string | string[]>;
23-
'terminal.integrated.shellArgs.windows': ISingleTerminalConfiguration<string | string[]>;
24-
'terminal.integrated.shellArgs.osx': ISingleTerminalConfiguration<string | string[]>;
25-
'terminal.integrated.shellArgs.linux': ISingleTerminalConfiguration<string | string[]>;
2617
'terminal.integrated.env.windows': ISingleTerminalConfiguration<ITerminalEnvironment>;
2718
'terminal.integrated.env.osx': ISingleTerminalConfiguration<ITerminalEnvironment>;
2819
'terminal.integrated.env.linux': ISingleTerminalConfiguration<ITerminalEnvironment>;

src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1921,8 +1921,8 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
19211921
this._modelService, this._configurationResolverService,
19221922
this._contextService, this._environmentService,
19231923
AbstractTaskService.OutputChannelId, this._fileService, this._terminalProfileResolverService,
1924-
this._pathService, this._viewDescriptorService, this._logService, this._configurationService, this._notificationService,
1925-
this, this._instantiationService,
1924+
this._pathService, this._viewDescriptorService, this._logService, this._notificationService,
1925+
this._instantiationService,
19261926
(workspaceFolder: IWorkspaceFolder | undefined) => {
19271927
if (workspaceFolder) {
19281928
return this._getTaskSystemInfo(workspaceFolder.uri.scheme);

src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,16 @@ import { ProblemMatcher, ProblemMatcherRegistry /*, ProblemPattern, getResource
2828
import { Codicon } from 'vs/base/common/codicons';
2929
import { Schemas } from 'vs/base/common/network';
3030
import { URI } from 'vs/base/common/uri';
31-
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
3231
import { ILogService } from 'vs/platform/log/common/log';
3332
import { INotificationService } from 'vs/platform/notification/common/notification';
34-
import { IShellLaunchConfig, TerminalSettingId, WaitOnExitValue } from 'vs/platform/terminal/common/terminal';
33+
import { IShellLaunchConfig, WaitOnExitValue } from 'vs/platform/terminal/common/terminal';
3534
import { formatMessageForTerminal } from 'vs/platform/terminal/common/terminalStrings';
3635
import { ThemeIcon } from 'vs/base/common/themables';
3736
import { IViewDescriptorService, IViewsService, ViewContainerLocation } from 'vs/workbench/common/views';
3837
import { TaskTerminalStatus } from 'vs/workbench/contrib/tasks/browser/taskTerminalStatus';
3938
import { ProblemCollectorEventKind, ProblemHandlingStrategy, StartStopProblemCollector, WatchingProblemCollector } from 'vs/workbench/contrib/tasks/common/problemCollectors';
4039
import { GroupKind } from 'vs/workbench/contrib/tasks/common/taskConfiguration';
4140
import { CommandOptions, CommandString, ContributedTask, CustomTask, DependsOrder, ICommandConfiguration, IConfigurationProperties, IExtensionTaskSource, InMemoryTask, IPresentationOptions, IShellConfiguration, IShellQuotingOptions, ITaskEvent, PanelKind, RevealKind, RevealProblemKind, RuntimeType, ShellQuoting, Task, TaskEvent, TaskEventKind, TaskScope, TaskSourceKind } from 'vs/workbench/contrib/tasks/common/tasks';
42-
import { ITaskService } from 'vs/workbench/contrib/tasks/common/taskService';
4341
import { IResolvedVariables, IResolveSet, ITaskExecuteResult, ITaskResolver, ITaskSummary, ITaskSystem, ITaskSystemInfo, ITaskSystemInfoResolver, ITaskTerminateResponse, TaskError, TaskErrors, TaskExecuteKind, Triggers } from 'vs/workbench/contrib/tasks/common/taskSystem';
4442
import { ITerminalGroupService, ITerminalInstance, ITerminalService } from 'vs/workbench/contrib/terminal/browser/terminal';
4543
import { VSCodeOscProperty, VSCodeOscPt, VSCodeSequence } from 'vs/workbench/contrib/terminal/browser/terminalEscapeSequences';
@@ -232,9 +230,7 @@ export class TerminalTaskSystem extends Disposable implements ITaskSystem {
232230
private _pathService: IPathService,
233231
private _viewDescriptorService: IViewDescriptorService,
234232
private _logService: ILogService,
235-
private _configurationService: IConfigurationService,
236233
private _notificationService: INotificationService,
237-
taskService: ITaskService,
238234
instantiationService: IInstantiationService,
239235
taskSystemInfoResolver: ITaskSystemInfoResolver,
240236
) {
@@ -1157,17 +1153,18 @@ export class TerminalTaskSystem extends Disposable implements ITaskSystem {
11571153
// Under Mac remove -l to not start it as a login shell.
11581154
if (platform === Platform.Platform.Mac) {
11591155
// Background on -l on osx https://github.com/microsoft/vscode/issues/107563
1160-
const osxShellArgs = this._configurationService.inspect(TerminalSettingId.ShellArgsMacOs);
1161-
if ((osxShellArgs.user === undefined) && (osxShellArgs.userLocal === undefined) && (osxShellArgs.userLocalValue === undefined)
1162-
&& (osxShellArgs.userRemote === undefined) && (osxShellArgs.userRemoteValue === undefined)
1163-
&& (osxShellArgs.userValue === undefined) && (osxShellArgs.workspace === undefined)
1164-
&& (osxShellArgs.workspaceFolder === undefined) && (osxShellArgs.workspaceFolderValue === undefined)
1165-
&& (osxShellArgs.workspaceValue === undefined)) {
1166-
const index = shellArgs.indexOf('-l');
1167-
if (index !== -1) {
1168-
shellArgs.splice(index, 1);
1169-
}
1170-
}
1156+
// TODO: Handle by pulling the default terminal profile?
1157+
// const osxShellArgs = this._configurationService.inspect(TerminalSettingId.ShellArgsMacOs);
1158+
// if ((osxShellArgs.user === undefined) && (osxShellArgs.userLocal === undefined) && (osxShellArgs.userLocalValue === undefined)
1159+
// && (osxShellArgs.userRemote === undefined) && (osxShellArgs.userRemoteValue === undefined)
1160+
// && (osxShellArgs.userValue === undefined) && (osxShellArgs.workspace === undefined)
1161+
// && (osxShellArgs.workspaceFolder === undefined) && (osxShellArgs.workspaceFolderValue === undefined)
1162+
// && (osxShellArgs.workspaceValue === undefined)) {
1163+
// const index = shellArgs.indexOf('-l');
1164+
// if (index !== -1) {
1165+
// shellArgs.splice(index, 1);
1166+
// }
1167+
// }
11711168
}
11721169
toAdd.push('-c');
11731170
}

0 commit comments

Comments
 (0)