mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-11 05:05:51 +01:00
Smart :autocmd completer
This commit is contained in:
7
common/content/autocommands.js
Normal file → Executable file
7
common/content/autocommands.js
Normal file → Executable file
@@ -194,7 +194,12 @@ const AutoCommands = Module("autocommands", {
|
|||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
bang: true,
|
bang: true,
|
||||||
completer: function (context) completion.autocmdEvent(context),
|
completer: function (context, args) {
|
||||||
|
if (args.length == 1)
|
||||||
|
return completion.autocmdEvent(context);
|
||||||
|
if (args.length == 3)
|
||||||
|
return args["-javascript"] ? completion.javascript(context) : completion.ex(context);
|
||||||
|
},
|
||||||
literal: 2,
|
literal: 2,
|
||||||
options: [[["-javascript", "-js"], commands.OPTION_NOARG]]
|
options: [[["-javascript", "-js"], commands.OPTION_NOARG]]
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user