1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 17:27:57 +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];
let [, spec, count, cmd, special, space, args] = matches;
if (/\w/.test(cmd) && args && !space)
if (/\w/.test(cmd) && args && !(space || args[0] == "|"))
args = null;
// parse count
@@ -805,8 +805,11 @@ const Commands = Module("commands", {
parseCommands: function (str, complete) {
do {
let [count, cmd, bang, args, len] = commands.parseCommand(str);
if (cmd == null)
if (cmd == null) {
yield [null, { commandString: str }];
return;
}
let command = commands.get(cmd);
if (command && complete) {
complete.fork(command.name);