1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 08:08:00 +01:00

More completion stuff. And move vimperator.png to chrome://liberator2/content/ -- long story.

This commit is contained in:
Kris Maglione
2008-11-24 10:10:49 +00:00
parent b2a87273f8
commit 9b14f6e331
14 changed files with 376 additions and 330 deletions

View File

@@ -421,12 +421,12 @@ function Commands() //{{{
if (!options)
options = [];
if (!argCount)
argCount = "*";
if (literal)
var literalIndex = argCount == "+" ? 0 : Math.max(argCount - 1, 0);
if (!argCount)
argCount = "*";
var args = {}; // parsed options
args.arguments = []; // remaining arguments
args.string = str; // for access to the unparsed string
@@ -510,7 +510,7 @@ function Commands() //{{{
count++; // to compensate the "=" character
}
else if (sep != null) // this isn't really an option as it has trailing characters, parse it as an argument
else if (!/\s/.test(sep)) // this isn't really an option as it has trailing characters, parse it as an argument
{
invalid = true;
}
@@ -623,12 +623,12 @@ function Commands() //{{{
else
compl = opt[3] || [];
context.title = [opt[0][0]];
context.items = completion.filter(compl.map(function ([k, v]) [args.quote(k), v]), args.completeFilter);;
context.completions = completion.filter(compl.map(function ([k, v]) [args.quote(k), v]), args.completeFilter);;
}
complete.advance(args.completeStart);
complete.title = ["Options"];
if (completeOpts)
complete.items = completeOpts;
complete.completions = completeOpts;
}
// check for correct number of arguments