mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-26 10:16:01 +01:00
command -> commandLine
This commit is contained in:
@@ -59,7 +59,7 @@ export type TerminalQuickFixCallbackExtension = (matchResult: TerminalCommandMat
|
||||
|
||||
|
||||
export interface TerminalCommandMatchResult {
|
||||
command: { command: string; exitStatus: boolean };
|
||||
commandLine: string;
|
||||
commandLineMatch: RegExpMatchArray;
|
||||
// full match and groups
|
||||
outputMatch: RegExpMatchArray;
|
||||
@@ -86,7 +86,7 @@ export interface ITerminalQuickFixProvider {
|
||||
provideTerminalQuickFixes(commandMatchResult: TerminalCommandMatchResult, token?: CancellationToken): Promise<TerminalQuickFix[] | TerminalQuickFix | undefined>;
|
||||
}
|
||||
export interface ITerminalCommandMatchResult {
|
||||
command: { command: string; exitStatus: boolean };
|
||||
commandLine: string;
|
||||
commandLineMatch: RegExpMatchArray;
|
||||
// full match and groups
|
||||
outputMatch: RegExpMatchArray;
|
||||
|
||||
@@ -41,7 +41,7 @@ export function gitSimilar(): IInternalOptions {
|
||||
actions.push({
|
||||
id: 'Git Similar',
|
||||
type: 'command',
|
||||
command: matchResult.command.command.replace(/git\s+[^\s]+/, `git ${fixedCommand}`),
|
||||
command: matchResult.commandLine.replace(/git\s+[^\s]+/, `git ${fixedCommand}`),
|
||||
addNewLine: true
|
||||
});
|
||||
}
|
||||
@@ -71,7 +71,7 @@ export function gitTwoDashes(): IInternalOptions {
|
||||
return {
|
||||
type: 'command',
|
||||
id: 'Git Two Dashes',
|
||||
command: matchResult.command.command.replace(` -${problemArg}`, ` --${problemArg}`),
|
||||
command: matchResult.commandLine.replace(` -${problemArg}`, ` --${problemArg}`),
|
||||
addNewLine: true
|
||||
};
|
||||
}
|
||||
@@ -102,7 +102,7 @@ export function freePort(terminalInstance?: Partial<ITerminalInstance>): IIntern
|
||||
label,
|
||||
enabled: true,
|
||||
run: async () => {
|
||||
await terminalInstance?.freePortKillProcess?.(port, matchResult.command.command);
|
||||
await terminalInstance?.freePortKillProcess?.(port, matchResult.commandLine);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -291,8 +291,7 @@ export async function getQuickFixesForCommand(
|
||||
if (!outputMatch) {
|
||||
continue;
|
||||
}
|
||||
const command = { command: newCommand, exitStatus: terminalCommand.exitCode !== 0 };
|
||||
const matchResult = { commandLineMatch, outputMatch, command };
|
||||
const matchResult = { commandLineMatch, outputMatch, commandLine: terminalCommand.command };
|
||||
const id = option.id;
|
||||
let quickFixes;
|
||||
switch (option.type) {
|
||||
|
||||
@@ -22,7 +22,7 @@ declare module 'vscode' {
|
||||
}
|
||||
|
||||
export interface TerminalCommandMatchResult {
|
||||
command: TerminalCommand;
|
||||
commandLine: string;
|
||||
commandLineMatch: RegExpMatchArray;
|
||||
// full match and groups
|
||||
|
||||
@@ -76,11 +76,6 @@ declare module 'vscode' {
|
||||
// ensure we can support all git similar using multiple lines
|
||||
}
|
||||
|
||||
export interface TerminalCommand {
|
||||
command: string;
|
||||
exitCode?: number;
|
||||
}
|
||||
|
||||
enum TerminalOutputAnchor {
|
||||
top = 'top',
|
||||
bottom = 'bottom'
|
||||
|
||||
Reference in New Issue
Block a user