Sha256: 2423ec3cce8b5e4f94703ff804f4684c485f8e8dc9d8e0b60c94ca73d09e8009

Contents?: true

Size: 234 Bytes

Versions: 8

Compression:

Stored size: 234 Bytes

Contents

require_relative '../lib/tty-reader'

puts "*** TTY::Reader Shell ***"
puts "Press Ctrl-X or ESC to exit"

reader = TTY::Reader.new

reader.on(:keyctrl_x, :keyescape) { puts "Exiting..."; exit }

loop do
  reader.read_line('=> ')
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
pokedex-terminal-0.2.8 vendor/bundle/ruby/2.7.0/gems/tty-reader-0.7.0/examples/shell.rb
pokedex-terminal-0.2.7 vendor/bundle/ruby/2.7.0/gems/tty-reader-0.7.0/examples/shell.rb
pokedex-terminal-0.2.6 vendor/bundle/ruby/2.7.0/gems/tty-reader-0.7.0/examples/shell.rb
pokedex-terminal-0.2.5 vendor/bundle/ruby/2.7.0/gems/tty-reader-0.7.0/examples/shell.rb
pokedex-terminal-0.2.4 vendor/bundle/ruby/2.7.0/gems/tty-reader-0.7.0/examples/shell.rb
tty-reader-0.7.0 examples/shell.rb
tty-reader-0.6.0 examples/shell.rb
tty-reader-0.5.0 examples/shell.rb