Skip to content

Commit 8862088

Browse files
committed
Removed parameters prompt creation
1 parent f8d1486 commit 8862088

File tree

1 file changed

+3
-20
lines changed

1 file changed

+3
-20
lines changed

src/command-manger.ts

+3-20
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@ import { window } from "vscode";
22
import { Command } from "./command";
33
import { updateConfiguration } from "./configuration";
44
import { DEFAULT_PATH } from "./constants";
5-
import {
6-
commandInputBox,
7-
nameInputBox,
8-
parameterInputBox,
9-
pathInputBox,
10-
} from "./input-boxes";
5+
import { commandInputBox, nameInputBox, pathInputBox } from "./input-boxes";
116

127
/**
138
* Create a new command.
@@ -21,7 +16,7 @@ function createNewCommand(
2116
command: string,
2217
name: string,
2318
path: string,
24-
parameters: string[],
19+
parameters?: string[],
2520
): Command {
2621
const newCommand: Command = {
2722
command: command.trim(),
@@ -55,18 +50,6 @@ export async function addNewCommand(): Promise<void> {
5550
return;
5651
}
5752

58-
const parameters: string[] = [];
59-
let parameter = await window.showInputBox(parameterInputBox(1));
60-
while (parameter?.trim()) {
61-
parameters.push(parameter.trim());
62-
parameter = await window.showInputBox(
63-
parameterInputBox(parameters.length + 1),
64-
);
65-
}
66-
if (parameter === undefined) {
67-
return;
68-
}
69-
70-
const newCommand = createNewCommand(command, name, path, parameters);
53+
const newCommand = createNewCommand(command, name, path);
7154
updateConfiguration(newCommand);
7255
}

0 commit comments

Comments
 (0)