>;
gets().split(/\n/).reverse().forEach(function (l) {
@@ -126,7 +129,37 @@ let PLUGIN_INFO =
liberator.echo(out);
}
},
- {},
+ {
+ bang: true,
+ literal: 0,
+ completer: function (context, args) {
+ if (!args.bang)
+ return;
+
+ context.createRow = function(item, highlightGroup) {
+ let desc = item[1] || this.process[1].call(this, item, item.description);
+
+ if (item.description && item.description.length) {
+ return
+
+ {item.description}
+
+ ;
+ }
+
+ return
+
{item[0]}
+ ;
+ };
+ context.filters = [function (item) this.match(item.description)];
+
+ context.completions = [
+ [it.replace(/^[^\t]+\t/, ''), it]
+ for ([, it] in Iterator(gets().split(/\n/).reverse()))
+ if (it.length)
+ ];
+ }
+ },
true
);
--
cgit v1.2.3