Skip to content

Commit cbe1da0

Browse files
committed
pass in shellType
1 parent b17791d commit cbe1da0

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,10 @@ export class MainThreadTerminalShellIntegration extends Disposable implements Ma
113113
}
114114

115115
private _enableShellIntegration(instance: ITerminalInstance): void {
116-
this._extensionService.activateByEvent('onTerminalShellIntegration');
116+
this._extensionService.activateByEvent('onTerminalShellIntegration:*');
117+
if (instance.shellType) {
118+
this._extensionService.activateByEvent('onTerminalShellIntegration:' + instance.shellType);
119+
}
117120
this._proxy.$shellIntegrationChange(instance.instanceId);
118121
const cwdDetection = instance.capabilities.get(TerminalCapability.CwdDetection);
119122
if (cwdDetection) {

src/vs/workbench/services/extensions/common/extensionsRegistry.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,8 @@ export const schema: IJSONSchema = {
405405
},
406406
{
407407
label: 'onTerminalShellIntegration',
408-
body: 'onTerminalShellIntegration',
409-
description: nls.localize('vscode.extension.activationEvents.onTerminalShellIntegration', 'An activation event emitted when terminal shell integration is activated.'),
408+
body: 'onTerminalShellIntegration:${1:shellType}',
409+
description: nls.localize('vscode.extension.activationEvents.onTerminalShellIntegration', 'An activation event emitted when terminal shell integration is activated for the given shell type.'),
410410
},
411411
{
412412
label: 'onMcpCollection',

0 commit comments

Comments
 (0)