1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 04:47:57 +01:00

Automagically tagify index entries without existing help tags rather than eliding them entirely.

This commit is contained in:
Kris Maglione
2011-02-20 16:50:40 -05:00
parent 67079b8f54
commit 12c8074057
2 changed files with 14 additions and 6 deletions

View File

@@ -12,7 +12,7 @@ Components.utils.import("resource://dactyl/bootstrap.jsm");
defineModule("commands", {
exports: ["ArgType", "Command", "Commands", "CommandOption", "Ex", "commands"],
require: ["contexts"],
use: ["config", "options", "template", "util"]
use: ["config", "options", "services", "template", "util"]
}, this);
/**
@@ -1540,6 +1540,8 @@ var Commands = Module("commands", {
cmd.hive == commands.builtin ? "" : <span highlight="Object" style="padding-right: 1em;">{cmd.hive.name}</span>
]
})),
iterateIndex: function (args) let (tags = services["dactyl:"].HELP_TAGS)
this.iterate(args).filter(function (cmd) cmd.hive === commands.builtin || set.has(cmd.helpTag)),
format: {
headings: ["Command", "Group", "Description"],
description: function (cmd) template.linkifyHelp(cmd.description + (cmd.replacementText ? ": " + cmd.action : "")),