summaryrefslogtreecommitdiff
path: root/common/content/options.js
diff options
context:
space:
mode:
Diffstat (limited to 'common/content/options.js')
-rw-r--r--common/content/options.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/common/content/options.js b/common/content/options.js
index 99e6d51f..5454ec62 100644
--- a/common/content/options.js
+++ b/common/content/options.js
@@ -817,6 +817,36 @@ const Options = Module("options", {
}, {
}, {
commands: function () {
+ let args = {
+ getMode: function (args) findMode(args["-mode"]),
+ iterate: function (args) {
+ for (let map in mappings.iterate(this.getMode(args)))
+ for (let name in values(map.names))
+ yield { name: name, __proto__: map };
+ },
+ format: {
+ description: function (map) (XML.ignoreWhitespace = false, XML.prettyPrinting = false, <>
+ {options.get("passkeys").has(map.name)
+ ? <span highlight="URLExtra">(passed by {template.helpLink("'passkeys'")})</span>
+ : <></>}
+ {template.linkifyHelp(map.description)}
+ </>)
+ }
+ }
+
+ dactyl.addUsageCommand({
+ name: ["listo[ptions]", "lo"],
+ description: "List all options along with their short descriptions",
+ iterate: function (args) options,
+ format: {
+ description: function (opt) (XML.ignoreWhitespace = false, XML.prettyPrinting = false, <>
+ {opt.scope == Option.SCOPE_LOCAL
+ ? <span highlight="URLExtra">(buffer local)</span> : ""}
+ {template.linkifyHelp(opt.description)}
+ </>)
+ }
+ });
+
function setAction(args, modifiers) {
let bang = args.bang;
if (!args.length)