You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expose shell integration command knowledge to extensions #145234
registerQuickFixProvider(...options: ITerminalQuickFixOptions[]): void;exportinterfaceITerminalQuickFixOptions{commandLineMatcher: string|RegExp;outputMatcher?: ITerminalOutputMatcher;getQuickFixes: TerminalQuickFixCallback;exitStatus?: boolean;}exporttypeTerminalQuickFixMatchResult={commandLineMatch: RegExpMatchArray;outputMatch?: RegExpMatchArray|null};exporttypeTerminalQuickFixAction=IAction|ITerminalQuickFixCommandAction|ITerminalQuickFixOpenerAction;exporttypeTerminalQuickFixCallback=(matchResult: TerminalQuickFixMatchResult,command: ITerminalCommand)=>TerminalQuickFixAction[]|TerminalQuickFixAction|undefined;exportinterfaceITerminalQuickFixCommandAction{type: 'command';command: string;addNewLine: boolean;}exportinterfaceITerminalQuickFixOpenerAction{type: 'opener';uri: URI;}exportinterfaceITerminalOutputMatcher{/** * A string or regex to match against the unwrapped line. If this is a regex with the multiline * flag, it will scan an amount of lines equal to `\n` instances in the regex + 1. */lineMatcher: string|RegExp;/** * Which side of the output to anchor the {@link offset} and {@link length} against. */anchor: 'top'|'bottom';/** * How far from either the top or the bottom of the butter to start matching against. */offset: number;/** * The number of rows to match against, this should be as small as possible for performance * reasons. */length: number;}
Hi Megan Rogge (@meganrogge) and Daniel Imms (@Tyriar) - I've noticed this issue has been on an "iteration plan" in Nov and Oct of 2022. I'm wondering if you think it will be picked up any time soon? Thanks, really appreciate all the hard work!
Is there any way to receive a stream of raw data from a terminal that does not have shell integration? For example if I create a terminal with any command of my choice by setting shellPath to argv[0] and shellArgs to argv[1...].
Since there's only one command that could plausibly be run in that terminal it's not necessary to try and guess which command the output comes from. The current API doesn't seem to offer anything to cover this use case, and I think it would be too limiting for my purpose.
Catherine (@whitequark) no, this is only for when shell integration is enabled. There is the related proposal for buffer access which allows reading the buffer which would probably cover your use case. #207504
I have a quick question. What is the difference between this API and vscode.proposed.terminalExecuteCommandEvent.d.ts? My current use case is grabbing the output from an executed command, and I am using vscode.proposed.terminalExecuteCommandEvent.d.ts to do so. I suppose we can also use read() from vscode.proposed.terminalShellIntegration.d.ts to read the output stream but feel free to correct me. I wonder which one would you think have a higher chance for public release. Before these two APIs I remembered having to work around with the old vscode.proposed.terminalDataWriteEvent.d.ts, so I truly appreciate the current more stable approaches you have made available. Thanks!
Tri Pham (@itstreefam)terminalExecuteCommandEvent is old and will be removed, terminalDataWriteEvent is unlikely to get finalized and may be replaced eventually with improvements upon terminalShellIntegration. terminalShellIntegration should be finalized very soon, I just need a fix a few bugs with it.
Activity
ClockworkV commentedon Mar 17, 2022
I came here to request this, and here it is already.
Being in Backlog means it'll get on the work plan eventually?
Cheers, looking forward to this, it's the missing link for my 'debug last command line' extension!
Tyriar commentedon Jul 8, 2022
ClockworkV backlog means it's a valid item and it may be worked on in the future. I'm pretty sure this one will happen within the next year
meganrogge commentedon Oct 5, 2022
Proposal:
Alex Ross (@alexr00) and Ladislau Szomoru (@lszomoru) how does this look to you, as you'll be adopting this for the
gitextension?Tyriar commentedon Oct 7, 2022
Megan Rogge (@meganrogge) I've forked this off to #162950 as I realized this issue is more about general listening to commands
mmisiewicz commentedon Jun 3, 2023
Voting for this issue. The proposed interface would exactly solve a problem I have developing an extension.
lroberts7 commentedon Jun 5, 2023
+1 for this, can we get it on a roadmap plz?
mmisiewicz-yext commentedon Jun 30, 2023
Hi Megan Rogge (@meganrogge) and Daniel Imms (@Tyriar) - I've noticed this issue has been on an "iteration plan" in Nov and Oct of 2022. I'm wondering if you think it will be picked up any time soon? Thanks, really appreciate all the hard work!
133 remaining items
Tyriar commentedon Jun 18, 2024
Moving to July for Python to adopt first and give feedback before finalizing.
whitequark commentedon Jun 25, 2024
Is there any way to receive a stream of raw data from a terminal that does not have shell integration? For example if I create a terminal with any command of my choice by setting
shellPathtoargv[0]andshellArgstoargv[1...].Since there's only one command that could plausibly be run in that terminal it's not necessary to try and guess which command the output comes from. The current API doesn't seem to offer anything to cover this use case, and I think it would be too limiting for my purpose.
Tyriar commentedon Jun 25, 2024
Catherine (@whitequark) no, this is only for when shell integration is enabled. There is the related proposal for buffer access which allows reading the buffer which would probably cover your use case. #207504
whitequark commentedon Jun 25, 2024
Daniel Imms (@Tyriar) Thank you, this really helps!
Clarify TerminalShellExecutionEndEvent.exitCode
itstreefam commentedon Jul 25, 2024
I have a quick question. What is the difference between this API and vscode.proposed.terminalExecuteCommandEvent.d.ts? My current use case is grabbing the output from an executed command, and I am using vscode.proposed.terminalExecuteCommandEvent.d.ts to do so. I suppose we can also use read() from vscode.proposed.terminalShellIntegration.d.ts to read the output stream but feel free to correct me. I wonder which one would you think have a higher chance for public release. Before these two APIs I remembered having to work around with the old vscode.proposed.terminalDataWriteEvent.d.ts, so I truly appreciate the current more stable approaches you have made available. Thanks!
Tyriar commentedon Jul 25, 2024
Tri Pham (@itstreefam)
terminalExecuteCommandEventis old and will be removed,terminalDataWriteEventis unlikely to get finalized and may be replaced eventually with improvements uponterminalShellIntegration.terminalShellIntegrationshould be finalized very soon, I just need a fix a few bugs with it.Tyriar commentedon Jul 30, 2024
Plan:
Finalize shellIntegration API
Update distro