function cliToArrayOne(cliCommand) {
    let inString = false;
    const spaceIndexes = [0];
    for (let index = 0; index < cliCommand.length; index++) {
        const c = cliCommand[index];
        if (c.match(/[\s]/im) && !inString) {
            spaceIndexes.push(index);
        }
        if (c === `'`) {
            inString = !inString;
        }
    }
    spaceIndexes.push(cliCommand.length);
    const command = spaceIndexes
        .map((spaceIndex, i) => cliCommand.substring(i === 0 ? 0 : spaceIndexes[i - 1], spaceIndexes[i]).trim())
        .filter(s => !!s)
        // remove quotes
        .map(s => s.startsWith(`'`) ? s.substring(1, s.length) : s)
        .map(s => s.endsWith(`'`) ? s.substring(0, s.length - 1) : s)
        //  unescape parenthesis
        .map(s => s === `\\(` ? `(` : s === `\\)` ? `)` : s);
    return command;
}
Generates a command in the form of array of strings, compatible with {@link call} from given command line string . The string must contain only one command (no newlines).