Providing Interactive User Input with readline
An interactive user interface, like the one provided by your average SQL client, is a “command-line interface with a command-line app.” In other words, this sort of interface provides a customized “shell” into another environment. irb, the Ruby interactive interpreter, is a common example, as are SQL clients. Rather than accept a file full of strings as input, interactive applications provide a command prompt where commands or other input are entered by the user. The user typically has access to a history of commands previously entered and has the ability to edit commands in place before sending them to the program. Also, the user will have the ability to use tab completion of common commands or ...
Get Build Awesome Command-Line Applications in Ruby 2 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.