[fpc-pascal] Readline substitute

Johann Glaser Johann.Glaser at gmx.at
Sat Dec 10 22:08:56 CET 2011


Hi Krishna!

Am Samstag, den 10.12.2011, 12:13 +0530 schrieb Krishna:
> On Fri, Apr 29, 2011 at 10:18 PM, Johann Glaser <Johann.Glaser at gmx.at> wrote:
> > Hi!
> >
> > I want to equip a program with a command line and therefore want a
> > powerful and user-friendly input prompt. Currently I use
> >  ReadLn(CmdLine);
> > which is not as user-friendly as desired. :-)
> >
> > The usual answer for this question is libreadline. I already worked with
> > it (in plain C) but before I do a header translation for FreePascal I
> > wanted to ask you for your opinion if there is a better alternative or
> > anybody already has a header translation or even programmer-friendly
> > wrapper for the history and auto-completion stuff.
> 
> linenoise[1] and editline[2] are alternatives. Don't know if there are
> pascal bindings to those.
> 
> [1]: https://github.com/antirez/linenoise
> [2]: http://www.thrysoee.dk/editline/

Thanks for the tips!

I've evaluated EditLine but it had drawbacks to GNU Readline. The
relatively young linenoise unfortunately doesn't properly support
completion.

As mentioned before, I've already settled with GNU readline and already
wrote header translations as well as an OOP wrapper. I hope both are
useful for somebody and also might be included in future versions of
FreePascal.

Thanks
  Hansi





More information about the fpc-pascal mailing list