1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 07:57:59 +01:00

Complete :bmarkgit diff properly

This commit is contained in:
Kris Maglione
2008-12-05 08:45:43 -05:00
parent d81fdddb7b
commit d5439d0bdc
3 changed files with 54 additions and 9 deletions

View File

@@ -143,7 +143,7 @@ Command.prototype = {
return false;
},
parseArgs: function (args, complete) commands.parseArgs(args, this.options, this.argCount, false, this.literal, complete)
parseArgs: function (args, complete, extra) commands.parseArgs(args, this.options, this.argCount, false, this.literal, complete, extra)
}; //}}}
@@ -319,7 +319,7 @@ function Commands() //{{{
// @param allowUnknownOptions: -foo won't result in an error, if -foo isn't
// specified in "options"
// TODO: should it handle comments?
parseArgs: function (str, options, argCount, allowUnknownOptions, literal, complete)
parseArgs: function (str, options, argCount, allowUnknownOptions, literal, complete, extra)
{
// returns [count, parsed_argument]
function getNextArg(str)
@@ -421,6 +421,10 @@ function Commands() //{{{
args.string = str; // for access to the unparsed string
args.literalArg = "";
// FIXME!
for (let [k, v] in Iterator(extra || []))
args[k] = v;
var invalid = false;
// FIXME: best way to specify these requirements?
var onlyArgumentsRemaining = allowUnknownOptions || options.length == 0 || false; // after a -- has been found