Bestliner is a Ruby wrapper around the bestline library by Justine Tunney. The bestline library is written in portable ANSI C99 and provides interactive pseudoteletypewriter command sessions using ANSI Standard X3.64 control sequences.
Bestliner supports Emacs-style editing shortcuts, a searchable history, completion and hint support via callbacks and UTF-8 editing.
Here's a prompt that echos the input back to the user:
require "bestliner" while line = Bestliner.bestline("> ") do puts line end
The prompt includes Emacs-style shortcuts, a searchable history and UTF-8 editing all out of the box courtesy of the wrapped bestline library.
Bestliner is available as a gem:
$ gem install bestliner
More information is available in the docs.
Found a bug? I'd love to know about it. The best way is to report it in the Issues section on GitHub.
Bestliner uses Semantic Versioning 2.0.0.
Bestliner is licensed under the BSD-2 licence. See LICENSE for more details.