Dietline/rline also do this
On Jun 24, 2010, at 9:42 PM, Ethan Grammatikidis <eeke...@fastmail.fm>
wrote:
On 24 Jun 2010, at 20:04, pancake wrote:
I was quite happy when i read about linenoise..but after reading
the code..
how can somebody say that such code can replace readline? It just
read lines
and supports history. nothing more, there's no autocompletion and
does not works
on windows.
It also supports line editing, which is immensely valuable. In fact
I only looked at linenoise because I needed line editing. It's
misses a lot of keybindings I'm used to, but then so do many console
apps.
Some years ago I wrote 'dietline' which works on windows, osx,
linux, bsd.. using
scape codes, supports autocompletion, history and it's about 700LOC
It really
needs some work to have a standarized way to autocomplete (i didnt
really liked
the readline way).
dietline is now in r2 renamed as r_line. If somebody feels bored
and wants to
finish the autocompletion callback, just ping me.
If i would just wanted to have history i could probably do it in
50LOC.
On Thu, 24 Jun 2010 09:55:27 -0700
Evan Gates <evan.ga...@gmail.com> wrote:
On Thu, Jun 24, 2010 at 5:26 AM, Ethan Grammatikidis
<eeke...@fastmail.fm> wrote:
On 24 Jun 2010, at 07:10, anonymous wrote:
Works nice, but with 9term it is possible to move cursor and edit
line. If you don't want to use readline (because of license),
you can
use libedit from BSD.
Or linenoise[1], which sucks vastly less than either. :)
[1] http://github.com/antirez/linenoise
It's a single C file of 432 lines as opposed to libedit's 20k and
readline's
30k, and works with perhaps > 99% of the terminals still in use,
as nearly
all terminals respect vt100 escape codes. I was introduced to it
the other
day when looking for something to make rc usable on a machine
where 9term
just isn't working out, one way or another.
Quick clarification, srw does not use readline, it uses the ansi
escape codes and is as of this writing 143 sloc according to
sloccount.
linenoise seems interesting, I'll have to check it out.
-emg