1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 17:27:58 +01:00

Deal with Vimperator issue 425.

This commit is contained in:
Kris Maglione
2010-10-18 20:35:59 -04:00
parent eccba65fd4
commit 11b096f3fd

View File

@@ -903,7 +903,7 @@ const Commands = Module("commands", {
}
else if (count == -1)
fail("Error parsing arguments: " + arg);
else if (!onlyArgumentsRemaining && /^-/.test(arg))
else if (!onlyArgumentsRemaining && sub[0] === "-")
fail("Invalid option: " + arg);
if (arg != null)
@@ -1113,7 +1113,7 @@ const Commands = Module("commands", {
return [len - str.length, arg, quote];
},
quote: function quote(str) Commands.quoteArg[/[\s"'\\]|^$/.test(str)
quote: function quote(str) Commands.quoteArg[/[\s"'\\]|^$|^-/.test(str)
? (/[\b\f\n\r\t]/.test(str) ? '"' : "'")
: ""](str)
}, {