*
* @param {string} event The event name filter.
* @param {string} pattern The URL pattern filter.
- * @returns {AutoCommand[]}
+ * @returns {[AutoCommand]}
*/
get: function (event, pattern) {
return this._store.filter(function (autoCmd) autoCmd.match(event, regexp));
remove: deprecated("group.autocmd.remove", { get: function remove() autocommands.user.closure.remove }),
/**
- * Lists all autocommands with a matching *event* and *regexp*.
+ * Lists all autocommands with a matching *event*, *regexp* and optionally
+ * *hives*.
*
* @param {string} event The event name filter.
* @param {string} regexp The URL pattern filter.
+ * @param {[Hive]} hives List of hives.
+ * @optional
*/
- list: function (event, regexp) {
+ list: function (event, regexp, hives) {
+
+ let hives = hives || this.activeHives;
function cmds(hive) {
let cmds = {};
<td colspan="3">----- Auto Commands -----</td>
</tr>
{
- template.map(this.activeHives, function (hive)
+ template.map(hives, function (hive)
<tr highlight="Title">
<td colspan="3">{hive.name}</td>
</tr> +
let lastPattern = null;
var { url, doc } = args;
if (url)
- uri = util.newURI(url);
+ uri = util.createURI(url);
else
var { uri, doc } = buffer;
args["-group"].remove(event, regexp); // remove all
}
else
- autocommands.list(event, regexp); // list all
+ autocommands.list(event, regexp, args.explicitOpts["-group"] ? [args["-group"]] : null); // list all
}
}, {
bang: true,