Jeff Patterson wrote: > #run method inherited from Netlist super class > def run() > cmd='' > print "ready>" > while((cmd=gets) !~ /^\.$/) > begin > eval cmd,binding() > rescue Exception=>e > puts e.message > end > print "ready>" > end > end > end One suggestion: use readline. It's more user friendly. A minimal example is: require "readline" while line=Readline.readline("> ", true) puts line end The above, though simple, has cmdline history and editing. For command completion, you can do something like this: require "readline" require "abbrev" commands = %w{foo bar baz quux} abbrevs = commands.abbrev Readline.completion_proc = proc {|str| abbrevs[str]} puts "Commands are #{commands.join(" ")}. Use ^D to quit." while line=Readline.readline("> ", true) puts line end (But note that this doesn't handle the "bar"/"baz" amibiguity. The completion proc would have to be smarter for that.) -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407