[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

How to turn off input echo in irb?

Jacklty Lam

8/18/2006 7:54:00 PM

How to turn off input echo in irb?

jacklty

--
Posted via http://www.ruby-....

4 Answers

David Vallner

8/18/2006 9:33:00 PM

0

Jacklty Lam wrote:
> How to turn off input echo in irb?
>
> jacklty

irb is a read-eval-print-loop, why would you ever want to do that? If
you need just the output of some Ruby code, put it in a file and run it
with the ruby interpreter instead of irb.

David Vallner


Jacklty Lam

8/18/2006 9:54:00 PM

0

David Vallner wrote:
> Jacklty Lam wrote:
>> How to turn off input echo in irb?
>>
>> jacklty
>
> irb is a read-eval-print-loop, why would you ever want to do that? If
> you need just the output of some Ruby code, put it in a file and run it
> with the ruby interpreter instead of irb.
>
> David Vallner

I am trying to write a irb console in my java app (Using JTextArea and
Runtime). I got it work nicely, but irb always repeats the user input
after the enter key. That's why I want to disable the input echo.


--
Posted via http://www.ruby-....

David Vallner

8/18/2006 10:04:00 PM

0

Jacklty Lam wrote:
> I am trying to write a irb console in my java app (Using JTextArea and
> Runtime). I got it work nicely, but irb always repeats the user input
> after the enter key. That's why I want to disable the input echo.

Ah. *puts dumbass hat on*

Slight googlage shows me that if you're using Swing, you could as well
take the BeanShell (bsh) code, and rip off their JConsole class. Or
alternatively, look how fxri integrates with irb. And if you care for
personal opinions, I'd put the prompt into a separate JTextField and let
the JTextArea show the command echo.

David Vallner

Greg Chagnon

8/19/2006 10:24:00 AM

0

On Sat, 19 Aug 2006 06:33:26 +0900, David Vallner <david@vallner.net>
wrote:

>Jacklty Lam wrote:
>> How to turn off input echo in irb?
>>
>> jacklty
>
>irb is a read-eval-print-loop, why would you ever want to do that? If
>you need just the output of some Ruby code, put it in a file and run it
>with the ruby interpreter instead of irb.
>
If you are using irb in irb-mode in Emacs, then why would you want the
output echoed.

The only effect of echoing is that you don't see the output so you
have to toggle to the output window, scroll down, toggle back,
create send the next text, .... .

--------------------------------------------------
Thaddeus L. Olczyk, PhD
Think twice, code once.