Created
August 3, 2011 19:19
-
-
Save pioz/1123540 to your computer and use it in GitHub Desktop.
Readline
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'readline' | |
loop do | |
line = Readline::readline('> ') | |
break if line.nil? || line == 'quit' | |
Readline::HISTORY.push(line) | |
puts "echo: #{line}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment