mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 13:43:07 +00:00
parent
04d9921d07
commit
891fa89364
1 changed files with 7 additions and 2 deletions
|
@ -354,11 +354,16 @@ export class DecorationAddon extends Disposable implements ITerminalAddon {
|
|||
private async _getCommandActions(command: ITerminalCommand): Promise<IAction[]> {
|
||||
const actions: IAction[] = [];
|
||||
if (command.command !== '') {
|
||||
const label = localize("terminal.rerunCommand", 'Rerun Command');
|
||||
const labelRun = localize("terminal.rerunCommand", 'Rerun Command');
|
||||
actions.push({
|
||||
class: undefined, tooltip: label, dispose: () => { }, id: 'terminal.rerunCommand', label, enabled: true,
|
||||
class: undefined, tooltip: labelRun, dispose: () => { }, id: 'terminal.rerunCommand', label: labelRun, enabled: true,
|
||||
run: () => this._onDidRequestRunCommand.fire({ command })
|
||||
});
|
||||
const labelCopy = localize("terminal.copyCommand", 'Copy Command');
|
||||
actions.push({
|
||||
class: undefined, tooltip: labelCopy, dispose: () => { }, id: 'terminal.copyCommand', label: labelCopy, enabled: true,
|
||||
run: () => this._clipboardService.writeText(command.command)
|
||||
});
|
||||
}
|
||||
if (command.hasOutput) {
|
||||
if (actions.length > 0) {
|
||||
|
|
Loading…
Reference in a new issue