2
>
3
>
export function parseCommand(cmd: string) {
5
>
const splitCommand = extraSpacesStrippedCommand.split(/\s+(?![^[]*]|[^<]*>)/);
6
>
const bregex = /\.*[\][<>]/g;
7
>
8
>
const firstCommand = splitCommand.shift();
9
>
if (!firstCommand) throw new Error(`No command found in: ${cmd}`);
10
11
const parsedCommand: ParsedCommand = {