mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 21:48:00 +01:00
Deal with Vimperator issue 425.
This commit is contained in:
@@ -903,7 +903,7 @@ const Commands = Module("commands", {
|
|||||||
}
|
}
|
||||||
else if (count == -1)
|
else if (count == -1)
|
||||||
fail("Error parsing arguments: " + arg);
|
fail("Error parsing arguments: " + arg);
|
||||||
else if (!onlyArgumentsRemaining && /^-/.test(arg))
|
else if (!onlyArgumentsRemaining && sub[0] === "-")
|
||||||
fail("Invalid option: " + arg);
|
fail("Invalid option: " + arg);
|
||||||
|
|
||||||
if (arg != null)
|
if (arg != null)
|
||||||
@@ -1113,7 +1113,7 @@ const Commands = Module("commands", {
|
|||||||
return [len - str.length, arg, quote];
|
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) ? '"' : "'")
|
? (/[\b\f\n\r\t]/.test(str) ? '"' : "'")
|
||||||
: ""](str)
|
: ""](str)
|
||||||
}, {
|
}, {
|
||||||
|
|||||||
Reference in New Issue
Block a user