|
6 | 6 | import { Codicon } from 'vs/base/common/codicons';
|
7 | 7 | import { ConfigurationTarget, IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
8 | 8 | import { IQuickInputService, IKeyMods, IPickOptions, IQuickPickSeparator, IQuickInputButton, IQuickPickItem } from 'vs/platform/quickinput/common/quickInput';
|
9 |
| -import { IExtensionTerminalProfile, ITerminalProfile, ITerminalProfileObject, TerminalSettingPrefix } from 'vs/platform/terminal/common/terminal'; |
| 9 | +import { IExtensionTerminalProfile, ITerminalProfile, ITerminalProfileObject, TerminalSettingPrefix, type ITerminalExecutable } from 'vs/platform/terminal/common/terminal'; |
10 | 10 | import { getUriClasses, getColorClass, createColorStyleElement } from 'vs/workbench/contrib/terminal/browser/terminalIcon';
|
11 | 11 | import { configureTerminalProfileIcon } from 'vs/workbench/contrib/terminal/browser/terminalIcons';
|
12 | 12 | import * as nls from 'vs/nls';
|
@@ -131,11 +131,20 @@ export class TerminalProfileQuickpick {
|
131 | 131 | if (!name) {
|
132 | 132 | return;
|
133 | 133 | }
|
134 |
| - const newConfigValue: { [key: string]: ITerminalProfileObject } = { ...configProfiles }; |
135 |
| - newConfigValue[name] = { |
136 |
| - path: context.item.profile.path, |
137 |
| - args: context.item.profile.args |
138 |
| - }; |
| 134 | + const newConfigValue: { [key: string]: ITerminalExecutable } = { ...configProfiles }; |
| 135 | + newConfigValue[name] = { path: context.item.profile.path }; |
| 136 | + if (context.item.profile.args) { |
| 137 | + newConfigValue[name].args = context.item.profile.args; |
| 138 | + } |
| 139 | + if (context.item.profile.env) { |
| 140 | + newConfigValue[name].env = context.item.profile.env; |
| 141 | + } |
| 142 | + if (context.item.profile.color) { |
| 143 | + newConfigValue[name].color = context.item.profile.color; |
| 144 | + } |
| 145 | + if (context.item.profile.icon) { |
| 146 | + newConfigValue[name].icon = context.item.profile.icon; |
| 147 | + } |
139 | 148 | await this._configurationService.updateValue(profilesKey, newConfigValue, ConfigurationTarget.USER);
|
140 | 149 | },
|
141 | 150 | onKeyMods: mods => keyMods = mods
|
|
0 commit comments