]> git.lizzy.rs Git - linenoise.git/blobdiff - README.markdown
ctrl-t implemented
[linenoise.git] / README.markdown
index 0faa8425eaa40861037174ce3da0319b8112a7d6..5edb2b29774141d09253f9ca8ef3e1a945b9077a 100644 (file)
@@ -1,14 +1,19 @@
 # Linenoise
 
-A minimal, zero-config, readline replacement.
+A minimal, zero-config, BSD licensed, readline replacement.
 
 ## Can a line editing library be 20k lines of code?
 
 Line editing with some support for history is a really important feature for command line utilities. Instead of retyping almost the same stuff again and again it's just much better to hit the up arrow and edit on syntax errors, or in order to try a slightly different command. But apparently code dealing with terminals is some sort of Black Magic: readline is 30k lines of code, libedit 20k. Is it reasonable to link small utilities to huge libraries just to get a minimal support for line editing?
 
-It's a matter of coding philosophy. For me shipping zero-configuration software is very important. Software that just works, uncompressing the tar.gz and typing make. Also not enabling line editing if readline is not present in the system is lame: as it is not a blocking requirements many configuration script will just drop the support if you don't have the lib installed. The result is a pollution of binaries without line editing support.
+So what usually happens is either:
 
-So I spent more or less two hours doing a reality check resulting in this little library: is it *really* needed for a line editing library to be 20k lines of code?
+ * Large programs with configure scripts disabling line editing if readline is not present in the system, or not supporting it at all since readline is GPL licensed and libedit (the BSD clone) is not as known and available as readline is (Readl world example of this problem: Tclsh).
+ * Smaller programs not using a configure script not supporting line editing at all (A problem we had with Redis-cli for instance).
+The result is a pollution of binaries without line editing support.
+
+So I spent more or less two hours doing a reality check resulting in this little library: is it *really* needed for a line editing library to be 20k lines of code? Apparently not, it is possibe to get a very small, zero configuration, trivial to embed library, that solves the problem. Smaller programs will just include this, supporing line editing out of the box. Larger programs may use this little library or just checking with configure if readline/libedit is available and resorting to linenoise if not.
 
 ## Terminals, in 2010.
 
@@ -18,6 +23,19 @@ Since it's so young I guess there are a few bugs, or the lib may not compile or
 
 The library is currently less than 400 lines of code. In order to use it in your project just look at the *example.c* file in the source distribution, it is trivial. Linenoise is BSD code, so you can use both in free software and commercial software.
 
-Please fork it and add something interesting and send me a pull request.
+## Tested in...
+
+ * Linux text only console ($TERM = linux)
+ * Linux KDE terminal application ($TERM = xterm)
+ * Linux xterm ($TERM = xterm)
+ * Mac OS X iTerm ($TERM = xterm)
+ * Mac OS X default Terminal.app ($TERM = xterm)
+ * OpenBSD 4.5 through an OSX Terminal.app ($TERM = screen)
+
+Please test it everywhere you can and report back!
+
+## Let's push this forward!
+
+Please fork it and add something interesting and send me a pull request. What's especially interesting are fixes, new key bindings, completion.
 
 Send feedbacks to antirez at gmail