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

Begining of parseArgs-based completion; only works for :style, for now. Should probably be made intrinsic.

This commit is contained in:
Kris Maglione
2008-11-20 23:13:01 +00:00
parent aa13986142
commit 00f4b80232
4 changed files with 95 additions and 38 deletions

View File

@@ -430,7 +430,11 @@ liberator.registerObserver("load_commands", function ()
argCount: "2",
bang: true,
completer: function (filter) {
let compl = [];
let args = this.parseArgs(filter, true);
let compl = args ? args.completions : [];
if (args && args.completeOpt)
return [args.completeStart, compl];
try
{
compl.push([content.location.host, "Current Host"]);
@@ -442,7 +446,7 @@ liberator.registerObserver("load_commands", function ()
},
hereDoc: true,
literal: true,
options: [[["-name", "-n"], commands.OPTION_STRING],
options: [[["-name", "-n"], commands.OPTION_STRING, null, function () [[k, v.css] for ([k, v] in Iterator(styles.userNames))]],
[["-append", "-a"], commands.OPTION_NOARG]],
serial: function () [
{