File tree 1 file changed +3
-20
lines changed
1 file changed +3
-20
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,7 @@ import { window } from "vscode";
2
2
import { Command } from "./command" ;
3
3
import { updateConfiguration } from "./configuration" ;
4
4
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" ;
11
6
12
7
/**
13
8
* Create a new command.
@@ -21,7 +16,7 @@ function createNewCommand(
21
16
command : string ,
22
17
name : string ,
23
18
path : string ,
24
- parameters : string [ ] ,
19
+ parameters ? : string [ ] ,
25
20
) : Command {
26
21
const newCommand : Command = {
27
22
command : command . trim ( ) ,
@@ -55,18 +50,6 @@ export async function addNewCommand(): Promise<void> {
55
50
return ;
56
51
}
57
52
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 ) ;
71
54
updateConfiguration ( newCommand ) ;
72
55
}
You can’t perform that action at this time.
0 commit comments