mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 06:07:59 +01:00
Add :list* commands, linkify help tags in certain output, and augment :yank to accept JavaScript directly.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user