* [doc] read -qs
@ 2014-08-01 21:04 Stephane Chazelas
2014-08-03 18:28 ` Peter Stephenson
0 siblings, 1 reply; 4+ messages in thread
From: Stephane Chazelas @ 2014-08-01 21:04 UTC (permalink / raw)
To: zsh-workers
The doc for the "read" builtin has:
-s
Don't echo back characters if reading from the terminal.
Currently does not work with the -q option.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Why? It seems to work for me (no echo when I do "read -qs").
(zsh 5.0.5)
--
Stephane
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [doc] read -qs
2014-08-01 21:04 [doc] read -qs Stephane Chazelas
@ 2014-08-03 18:28 ` Peter Stephenson
2014-08-03 21:38 ` Stephane Chazelas
0 siblings, 1 reply; 4+ messages in thread
From: Peter Stephenson @ 2014-08-03 18:28 UTC (permalink / raw)
To: zsh-workers
On Fri, 1 Aug 2014 22:04:41 +0100
Stephane Chazelas <stephane.chazelas@gmail.com> wrote:
> The doc for the "read" builtin has:
>
> -s
> Don't echo back characters if reading from the terminal.
> Currently does not work with the -q option.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Why? It seems to work for me (no echo when I do "read -qs").
Yes, looking at the current code I think this is properly covered and
not just a fluke in your case --- we change the TTY mode before handing
'-q' and put it back afterwards. I haven't done the archival research
that would explain the change, however --- I've a vague suspicion we
rationalised -q into the -k code at some point.
diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo
index a4d6f89..f709f50 100644
--- a/Doc/Zsh/builtins.yo
+++ b/Doc/Zsh/builtins.yo
@@ -1288,8 +1288,7 @@ continuation and backslashes in the line don't quote the following
character and are not removed.
)
item(tt(-s))(
-Don't echo back characters if reading from the terminal. Currently does
-not work with the tt(-q) option.
+Don't echo back characters if reading from the terminal.
)
item(tt(-q))(
Read only one character from the terminal and set var(name) to
--
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [doc] read -qs
2014-08-03 18:28 ` Peter Stephenson
@ 2014-08-03 21:38 ` Stephane Chazelas
2014-08-04 18:40 ` Peter Stephenson
0 siblings, 1 reply; 4+ messages in thread
From: Stephane Chazelas @ 2014-08-03 21:38 UTC (permalink / raw)
To: zsh-workers
2014-08-03 19:28:41 +0100, Peter Stephenson:
[...]
> )
> item(tt(-s))(
> -Don't echo back characters if reading from the terminal. Currently does
> -not work with the tt(-q) option.
> +Don't echo back characters if reading from the terminal.
> )
> item(tt(-q))(
[...]
Thanks.
What about using "locale yesexpr" for that BTW?
Cheers,
Stephane
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [doc] read -qs
2014-08-03 21:38 ` Stephane Chazelas
@ 2014-08-04 18:40 ` Peter Stephenson
0 siblings, 0 replies; 4+ messages in thread
From: Peter Stephenson @ 2014-08-04 18:40 UTC (permalink / raw)
To: zsh-workers
On Sun, 3 Aug 2014 22:38:03 +0100
Stephane Chazelas <stephane.chazelas@gmail.com> wrote:
> 2014-08-03 19:28:41 +0100, Peter Stephenson:
> [...]
> > )
> > item(tt(-s))(
> > -Don't echo back characters if reading from the terminal. Currently does
> > -not work with the tt(-q) option.
> > +Don't echo back characters if reading from the terminal.
> > )
> > item(tt(-q))(
> [...]
>
> Thanks.
>
> What about using "locale yesexpr" for that BTW?
Mulling it over, since read -q has a single clear historical meaning
that gets a bit obscured when locales come into it, I think this might
better be done by a tailorable function using read -k, as indeed the
Linux manual page suggests. We could host a sample function (using =~,
probably) if somebody wanted to write one.
pws
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-08-04 18:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-01 21:04 [doc] read -qs Stephane Chazelas
2014-08-03 18:28 ` Peter Stephenson
2014-08-03 21:38 ` Stephane Chazelas
2014-08-04 18:40 ` Peter Stephenson
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).