[Haskell-cafe] Disable echo in POSIX terminal
Taylor Venable
taylor at metasyntax.net
Fri Nov 9 11:23:00 EST 2007
On Fri, 9 Nov 2007 16:09:57 +0000
"Neil Mitchell" <ndmitchell at gmail.com> wrote:
> Hi
>
> > I've written a little Haskell program to get information from a
> > MySQL database (great thanks to anybody reading this who works on
> > HSQL, by the way) but I want to keep the user's password concealed,
> > obviously. Currently I prompt for it from the terminal, but the
> > problem is that it's echoed just like all other input. I would
> > like to disable input echo when asking for the password, but I'm
> > not sure how. I notice there's a System.POSIX.Terminal module, but
> > I have no idea how to use it, or whether it will do what I want.
> > Any ideas would be greatly appreciated.
>
> http://haskell.org/hoogle/?q=echo
>
> A quick Hoogle search for echo suggests hSetEcho, so perhaps hSetEcho
> stdin False would work.
Oh my, I completely forgot about Hoogle and missed those obvious
functions. That's it exactly. Thanks very much for the pointers!
--
Taylor Venable
taylor at metasyntax.net
http://real.metasyntax.net:2357/
More information about the Haskell-Cafe
mailing list