RCommand is a generic way for ruby scripts to present a full-featured command interface to users, complete with command history and tab completion.
RCommand can use several different methods of input and output. If standard input and output are used, RCommand will attempt to use the readline library. The i/o method to be used can be manually overridden if necessary.
Example
command_line = RCommand.new($stdin, $stdout)
loop do
command_line.prompt = "#{command_line.history.size}:> "
result = command_line.readline()
command_line.io_write.print("Example command: #{result}")
end