From: "Joec_49@..." Date: 2011-10-04T22:14:19+09:00 Subject: Re: Readline question - completely replace input? Use regexp or string.sub to do this Joe Sent from my iPad On Oct 4, 2011, at 9:07 AM, Marc Heiler wrote: > Hi. > > This is a strange question perhaps ... > > I use Readline.readline to fetch user input. > > Now if the user types: > > > "abc" > > And then presses tab, I want this to complete to: > > "do_action foobar" > > So, yes, the original input "abc" no longer has anything to do with the > end result. :) > > Is this possible? So far I am using Readline only to do something like: > > > "do" > > expand into > > "do_action " > > But it would be kind of neat to both append something specifically after > TAB was pressed, and to also completely change the original input at the > same time. > > -- > Posted via http://www.ruby-forum.com/. > >