Dan Zwell
7/31/2007 4:05:00 AM
Ari Brown wrote:
> Before you all read on, there is a restriction...
>
> Without Highline!!!!!!!!
> Sorry, James, I love the library, but I need this to work over IO.
>
> How can I hide user input (as they type) without highline? Am I able to
> use blocks after gets()?
> I'm hoping I can do something like this:
>
> name = gets.chomp {|let| let.echo = false}
>
> or something. I don't care how odd or crazy a solution, method, or
> whatever is. I'm looking for guidance in an almost pitch-black room of
> metaphors and elongation of said metaphors.
>
> Thanks,
> aRi
> --------------------------------------------|
> If you're not living on the edge,
> then you're just wasting space.
>
>
>
>
Ari,
If it's on linux/unix, maybe mac as well,
system('stty -echo')
Just make sure you later call
system('stty echo'), because it would be extremely rude not to. I would
also surround the whole program in a begin / ensure / end block so that
you can ensure "stty echo" gets called at the end.
Dan