mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 07:28:00 +01:00
Add -types argument to :ext* commands.
This commit is contained in:
@@ -88,6 +88,18 @@
|
||||
|
||||
<h2 tag="extensions add-ons">Add-ons</h2>
|
||||
|
||||
<p>
|
||||
The following commands manipulate the currently installed
|
||||
add-ons. With the exception of <ex>:extadd</ex>, they all except
|
||||
the following arguments:
|
||||
</p>
|
||||
|
||||
<dl>
|
||||
<dt>-types</dt> <dd>The types of add-ons to operate on, the most
|
||||
common types being <tt>extension</tt>, <tt>theme</tt>, and <tt>plugin</tt> (short names <em>-type</em>,
|
||||
<em>-t</em>)</dd>
|
||||
</dl>
|
||||
|
||||
<item>
|
||||
<tags>:exta :extadd</tags>
|
||||
<spec>:exta<oa>dd</oa> <a>file|url</a></spec>
|
||||
|
||||
@@ -423,7 +423,7 @@ var Addons = Module("addons", {
|
||||
else
|
||||
dactyl.assert(name, _("error.argumentRequired"));
|
||||
|
||||
AddonManager.getAddonsByTypes(["extension"], dactyl.wrapCallback(function (list) {
|
||||
AddonManager.getAddonsByTypes(args["-types"], dactyl.wrapCallback(function (list) {
|
||||
if (!args.bang || command.bang) {
|
||||
list = list.filter(function (extension) extension.name == name);
|
||||
if (list.length == 0)
|
||||
@@ -439,13 +439,22 @@ var Addons = Module("addons", {
|
||||
}, {
|
||||
argCount: "?", // FIXME: should be "1"
|
||||
bang: true,
|
||||
completer: function (context) {
|
||||
completion.extension(context);
|
||||
completer: function (context, args) {
|
||||
completion.extension(context, args["-types"]);
|
||||
context.filters.push(function ({ item }) ok(item));
|
||||
if (command.filter)
|
||||
context.filters.push(command.filter);
|
||||
},
|
||||
literal: 0
|
||||
literal: 0,
|
||||
options: [
|
||||
{
|
||||
names: ["-types", "-type", "-t"],
|
||||
description: "The add-on types to operate on",
|
||||
default: ["extension"],
|
||||
completer: function (context, args) completion.addonType(context),
|
||||
type: CommandOption.LIST
|
||||
}
|
||||
]
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
@@ -111,6 +111,8 @@
|
||||
- Added :mksyntax command to auto-generate Vim syntax files. [b4]
|
||||
- Added 's' and 'e' flags to :pageinfo command. [b7]
|
||||
- Added :pintab and :unpintab commands. [b7]
|
||||
- Extension manipulation commands, including :extenable, :extdisable,
|
||||
and :exttoggle, now accept a -types argument.
|
||||
- :tabmove now moves to the position of tab N, not after it.
|
||||
Without arguments it no longer moves the tab to the end of
|
||||
the list. [b7]
|
||||
|
||||
Reference in New Issue
Block a user