Posted By

markryall on 03/28/08


Tagged

command line readline


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

webstic


readline


 / Published in: Ruby
 

  1. require 'readline'
  2.  
  3. include Readline
  4.  
  5. Readline.completion_proc = lambda {|input|["#{input}1","#{input}2"]}
  6.  
  7. while line = readline("Prompt> ", TRUE)
  8. print line, "\n"
  9. end

Report this snippet  

You need to login to post a comment.