Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: read -s

On 14 Aug, you wrote:
> In bash, I can do "read -s" to emulate a password prompt without any
> echoing. Is there some way to do the same in zsh? The -s or a similar
> parameter isn't supported, is it? Is there an external command that I
> don't know? Thanks for any input!

You can use stty to turn off echoing. Like this:

stty -echo
read password
stty echo

I expect it would be fairly easy to add this -s option to the read in zsh.
Does anyone think it would be worth doing?


This e-mail and any attachment is for authorised use by the intended recipient(s) only.  It may contain proprietary material, confidential information and/or be subject to legal privilege.  It should not be copied, disclosed to, retained or used by, any other party.  If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender.  Thank you.

Messages sorted by: Reverse Date, Date, Thread, Author