We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 67a9206 commit c78ec3fCopy full SHA for c78ec3f
assets/ts/terminal/helpers.ts
@@ -49,10 +49,12 @@ export function getCommandFromInput(input: string): {
49
} {
50
if (input === "") return { command: undefined, args: [] };
51
52
- const command: Command | undefined = Terminal.commands.find((command: Command) =>
53
- input.startsWith(command.name),
+ const splitInput = input.split(" ");
+
54
+ const command: Command | undefined = Terminal.commands.find(
55
+ (command: Command) => splitInput[0].toLowerCase() === command.name.toLowerCase(),
56
);
- const args = input.split(" ").slice(1) || [];
57
+ const args = splitInput.slice(1) || [];
58
59
return { command, args };
60
}
0 commit comments