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

Banish old commands.parseArgs prototype.

This commit is contained in:
Kris Maglione
2010-09-24 15:59:51 -04:00
parent 0753c9505e
commit 3645cd27d0
3 changed files with 4 additions and 7 deletions

View File

@@ -561,7 +561,7 @@ const Commands = Module("commands", {
* Args object.
* @returns {Args}
*/
parseArgs: function (str, options, argCount, allowUnknownOptions, literal, complete, extra) {
parseArgs: function (str, params) {
function getNextArg(str) {
let [count, arg, quote] = Commands.parseArg(str, null, keepQuotes);
if (quote == "\\" && !complete)
@@ -571,10 +571,7 @@ const Commands = Module("commands", {
return [count, arg, quote];
}
let keepQuotes;
if (isObject(options))
({ allowUnknownOptions, argCount, complete, extra, literal, options, keepQuotes }) = options;
var { allowUnknownOptions, argCount, complete, extra, literal, options, keepQuotes } = params;
if (!options)
options = [];