Perl 6 comes with a REPL; and that REPL picks up plugins such as Linenoise as soon as it's installed, getting all the goodies. However, it's not clear to me how Linenoise plugs into the REPL to provide that functionality. I haven't seen it documented anywhere, either. If I want to create my own plugin for providing, let's say, other type of tab completion (which Linenoise already has, but far as I can tell, only for keywords), or anything else for that matter, how could I proceed? Is there any particular part of Linenoise I could fork for doing that? This would help, for instance, towards providing a better REPL, as the community has requested for some time already.
Asked
Active
Viewed 269 times
14
-
5`git grep Linenoise` -- https://github.com/rakudo/rakudo/blob/b7190f649747486896cf2c399797dfd1cd883876/src/core/REPL.pm6#L205-L211 -- As you can see this isn't a public plugin API. – ugexe Aug 21 '18 at 18:59
-
Is this similar to my question: https://stackoverflow.com/questions/50119972/perl6-repl-usage ? – Calcite Aug 28 '18 at 13:08
-
1@JasonDoege there's some relation, but I was looking for something along the lines of adding functionality to the REPL and using it automatically without calling any other method or module. – jjmerelo Aug 29 '18 at 15:35
1 Answers
2
You currently cannot, at least not without patching Raku. It's hard-coded in Raku's source code.

moritz
- 12,710
- 1
- 41
- 63