Thanks for this!  I've run into that same issue with irb from time to
time, but just chalked it up to dealing with it.  I use irb a lot for
step by step development or concept testing before I invest in an
organized and commented script.  I'm not sure how you're using the
#{libs} variable, so I omitted it for my own use and created a
shortcut to irb.bat with the other command line options.

Adam

On Feb 5, 1:02 pm, Alan Baird <[email protected]> wrote:
> Here is another cool trick I learned today.
>
> I remember how cool it was when I found out about watir-console.  You know, 
> that tiny program that's in the /watir/bin folder that automagically requires 
> watir for you when you want to perform some cool irb-style command line stuff 
> with watir?
>
> However, I soon learned that watir-console has the same problem in the 
> windows command line that irb does; whenever you go over a certain command 
> line limit (somewhere around 80-100 characters) the command line just freaks 
> out and skips around a bunch of lines.  It makes irb completely unusable and 
> you have to CTRL-C a bunch to get it back to sanity.  Well, there is a way to 
> fix this.  All you need to do is type "irb --noreadline" and command line 
> sanity will be restored.
>
> So, I was a little sad that I couldn't do the same thing to 
> watir-console...until today.  Since watir console is so simple, you just need 
> to do the same thing to it that you did on the irb command line.
>
> Specifically, change:
> exec "irb.bat #{$libs} -r rubygems -r irb/completion -r watir/irb-history -r 
> watir --simple-prompt --readline"
>
> to
>
> exec "irb.bat #{$libs} -r rubygems -r irb/completion -r watir/irb-history -r 
> watir --simple-prompt --noreadline"
>
> I don't know why I didn't think about this earlier but oh well.  I have 
> restored command line sanity to my environment and all is well.
>
> Enjoy,
> Alan
>
> This email message and any attachments are for the sole use of the intended 
> recipients and may contain proprietary and/or confidential information which 
> may be privileged or otherwise protected from disclosure. Any unauthorized 
> review, use, disclosure or distribution is prohibited. If you are not an 
> intended recipient, please contact the sender by reply email and destroy the 
> original message and any copies of the message as well as any attachments to 
> the original message.

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/watir-general

Reply via email to