From 9487758a917d28dcaa25e737f38d9d84cef9fdcf Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Mon, 4 Oct 2010 14:25:08 -0400 Subject: [PATCH] Fix some command parsing-related bugginess. --- common/content/commands.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/common/content/commands.js b/common/content/commands.js index ef1be527..916dca46 100644 --- a/common/content/commands.js +++ b/common/content/commands.js @@ -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);