1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 19:57:58 +01:00

Fix some command parsing-related bugginess.

This commit is contained in:
Kris Maglione
2010-10-04 14:25:08 -04:00
parent 044f6e5784
commit 9487758a91

View File

@@ -790,7 +790,7 @@ const Commands = Module("commands", {
return [null, null, null, null]; return [null, null, null, null];
let [, spec, count, cmd, special, space, args] = matches; let [, spec, count, cmd, special, space, args] = matches;
if (/\w/.test(cmd) && args && !space) if (/\w/.test(cmd) && args && !(space || args[0] == "|"))
args = null; args = null;
// parse count // parse count
@@ -805,8 +805,11 @@ const Commands = Module("commands", {
parseCommands: function (str, complete) { parseCommands: function (str, complete) {
do { do {
let [count, cmd, bang, args, len] = commands.parseCommand(str); let [count, cmd, bang, args, len] = commands.parseCommand(str);
if (cmd == null) if (cmd == null) {
yield [null, { commandString: str }];
return; return;
}
let command = commands.get(cmd); let command = commands.get(cmd);
if (command && complete) { if (command && complete) {
complete.fork(command.name); complete.fork(command.name);