diff options
author | Kris Maglione <maglione.k@gmail.com> | 2011-06-01 17:19:55 -0400 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2011-06-01 17:19:55 -0400 |
commit | 61aa32fd1353eeedeced63f17e1fa34d76abaedc (patch) | |
tree | 99631a1e9aa39c17209472c7124498cc9b4f0ffd | |
parent | d34a7b27e480e274d6a49886f1271d76226f4a37 (diff) | |
download | pentadactyl-61aa32fd1353eeedeced63f17e1fa34d76abaedc.tar.gz |
Add -types argument to :ext* commands.
-rw-r--r-- | common/locale/en-US/gui.xml | 12 | ||||
-rw-r--r-- | common/modules/addons.jsm | 17 | ||||
-rw-r--r-- | pentadactyl/NEWS | 2 |
3 files changed, 27 insertions, 4 deletions
diff --git a/common/locale/en-US/gui.xml b/common/locale/en-US/gui.xml index 6cfa79a3..df112ab4 100644 --- a/common/locale/en-US/gui.xml +++ b/common/locale/en-US/gui.xml @@ -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> diff --git a/common/modules/addons.jsm b/common/modules/addons.jsm index 74ce3cf6..3e3176d0 100644 --- a/common/modules/addons.jsm +++ b/common/modules/addons.jsm @@ -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 + } + ] }); }); }, diff --git a/pentadactyl/NEWS b/pentadactyl/NEWS index f50cb7fa..481c7ba5 100644 --- a/pentadactyl/NEWS +++ b/pentadactyl/NEWS @@ -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] |