Project

bestliner

0.0
No release in over a year
Bestliner is a Ruby wrapper around bestline, a C library for 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.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

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.