16

I love the GNU readline library, but since it is under a GPL license, I can not use it for commercial software. Do you know alternatives ? I only need the commandline history and auto completion (of customer keywords and files) features. I found this link :

http://github.com/antirez/linenoise

which seem to be a good starting point, but does not have auto completion.

Any suggestions, surely this must be a common task for people building interactive shell commands.

Update :

Upps forgot one important detail it should also run on windows..

Bo Jensen
  • 638
  • 6
  • 13
  • The alternative is to make your software free. At least, RMS thinks so. – P Shved Apr 29 '10 at 09:49
  • Technically, you can use it in commercial software, just not proprietary/closed source software. That distinction probably isn't of much help to you though... – Mikael Auno Apr 29 '10 at 11:13
  • Possible duplicate of [Lightweight GNU readline alternative](https://stackoverflow.com/questions/17982633/lightweight-gnu-readline-alternative) – AmokHuginnsson Jul 30 '19 at 10:50

2 Answers2

8

NetBSD has a Readline replacement library called libedit, see http://www.thrysoee.dk/editline/.

cjg
  • 2,727
  • 1
  • 19
  • 23
6

I haven't used it, but this http://www.astro.caltech.edu/~mcs/tecla/index.html appears to be a getline replacement, with a non-restrictive license.