mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-29 10:52:27 +01:00
add :set validation and completion for 'eventignore' and 'suggestengines'
This commit is contained in:
@@ -47,7 +47,19 @@ liberator.AutoCommands = function () //{{{
|
||||
|
||||
liberator.options.add(["eventignore", "ei"],
|
||||
"List of autocommand event names which should be ignored",
|
||||
"stringlist", "");
|
||||
"stringlist", "",
|
||||
{
|
||||
completer: function (value) Array(liberator.config.autocommands).push(["all", "All events"]),
|
||||
validator: function (value)
|
||||
{
|
||||
let values = value.split(",");
|
||||
let events = liberator.config.autocommands.map(function (e) e[0]);
|
||||
|
||||
events.push("all");
|
||||
|
||||
return values.every(function (event) events.indexOf(event) >= 0);
|
||||
}
|
||||
});
|
||||
|
||||
liberator.options.add(["focuscontent", "fc"],
|
||||
"Try to stay in normal mode after loading a web page",
|
||||
|
||||
Reference in New Issue
Block a user