Bestliner

Gem Version

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.

Example

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.

Installation

Bestliner is available as a gem:

$ gem install bestliner

Documentation

More information is available in the docs.

Bugs

Found a bug? I'd love to know about it. The best way is to report it in the Issues section on GitHub.

Versioning

Bestliner uses Semantic Versioning 2.0.0.

Licence

Bestliner is licensed under the BSD-2 licence. See LICENSE for more details.