How to turn off input echo in irb?

D

David Vallner

Jacklty said:
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
 
J

Jacklty Lam

David said:
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.
 
D

David Vallner

Jacklty said:
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
 
T

Thaddeus L Olczyk

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, .... .
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top