Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: quick fix contrib #164526

Closed
3 tasks done
meganrogge opened this issue Oct 24, 2022 · 1 comment
Closed
3 tasks done

Test: quick fix contrib #164526

meganrogge opened this issue Oct 24, 2022 · 1 comment
Assignees
Milestone

Comments

@meganrogge
Copy link
Contributor

meganrogge commented Oct 24, 2022

Refs #162950

Complexity: 4

Authors: @meganrogge @Tyriar

Create Issue


Terminal quick fixes can now be contributed via an extension's contribution in a package.json as described here

properties: {
quickFixes: {
type: 'array',
description: nls.localize('vscode.extension.contributes.terminal.quickFixes', "Defines quick fixes for terminals with shell integration enabled."),
items: {
type: 'object',
required: ['id', 'commandLineMatcher', 'outputMatcher'],
defaultSnippets: [{
body: {
id: '$1',
commandLineMatcher: '$2',
outputMatcher: '$3',
commandToRun: '$4',
linkToOpen: '$5'
}
}],
properties: {
id: {
description: nls.localize('vscode.extension.contributes.terminal.quickFixes.id', "The ID of the quick fix."),
type: 'string',
},
commandLineMatcher: {
description: nls.localize('vscode.extension.contributes.terminal.quickFixes.commandLineMatcher', "The command line to match."),
type: 'string',
},
outputMatcher: {
description: nls.localize('vscode.extension.contributes.terminal.quickFixes.outputMatcher', "The output to match, which provides groups of the form <group_name> to be referenced via ${group:group_name} in commandToRun and linkToOpen."),
type: 'object',
required: ['lineMatcher', 'anchor', 'offset', 'length'],
properties: {
lineMatcher: {
description: 'The command line to match',
type: 'string'
},
anchor: {
description: 'Which side of the output to anchor the offset and length against',
enum: ['top', 'bottom']
},
offset: {

We've moved several of the builtin terminal quick fix actions over to using this contribution point.

Verify that they still work:

  • git push on a branch without a remote should allow you set the upstream
  • git push --set-upstream... should prompt you to create a PR

Note that this is still a proposed API contrib, so must be explicitly enabled.

  "enabledApiProposals": [
    "contribTerminalQuickFixes"
  ],
@eleanorjboyd
Copy link
Member

same issue as @andreamah, checking mine off but agree with what she wrote in the ticket

@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants