Skip to content

Instantly share code, notes, and snippets.

@pioz
Created August 3, 2011 19:19
Show Gist options
  • Save pioz/1123540 to your computer and use it in GitHub Desktop.
Save pioz/1123540 to your computer and use it in GitHub Desktop.
Readline
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