zsh-workers
 help / color / mirror / code / Atom feed
* read -u n -t -k      Does not work.
@ 2022-07-29 19:20 johnnonedoe
  2022-07-29 19:40 ` Lawrence Velázquez
  0 siblings, 1 reply; 3+ messages in thread
From: johnnonedoe @ 2022-07-29 19:20 UTC (permalink / raw)
  To: zsh-workers

read -t -k
Works as expected.
read -u 0 -t -k
Blocks till return is typed.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: read -u n -t -k      Does not work.
  2022-07-29 19:20 read -u n -t -k Does not work johnnonedoe
@ 2022-07-29 19:40 ` Lawrence Velázquez
       [not found]   ` <549595162.4093300.1659133992108@mail.yahoo.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Lawrence Velázquez @ 2022-07-29 19:40 UTC (permalink / raw)
  To: johnnonedoe; +Cc: zsh-workers

On Fri, Jul 29, 2022, at 3:20 PM, johnnonedoe@aol.com wrote:
> read -t -k
> Works as expected.
> read -u 0 -t -k
> Blocks till return is typed.

I don't see this behavior.

    % zsh --version
    zsh 5.9 (x86_64-apple-darwin18.7.0)
    % zsh -fc 'read -t -k'
    % zsh -fc 'read -u 0 -t -k'
    %

More information about your operating system and zsh version might
be helpful.

-- 
vq


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: read -u n -t -k      Does not work.
       [not found]   ` <549595162.4093300.1659133992108@mail.yahoo.com>
@ 2022-07-29 22:57     ` Lawrence Velázquez
  0 siblings, 0 replies; 3+ messages in thread
From: Lawrence Velázquez @ 2022-07-29 22:57 UTC (permalink / raw)
  To: johnnonedoe; +Cc: zsh-workers

I'm looping the list back in.  Please remember to reply to the list
in the future.

On Fri, Jul 29, 2022, at 6:33 PM, johnnonedoe@aol.com wrote:
> Thanks for the timely reply. 
>
> macOS Monterey version 12.4
> zsh 5.8.1 (x86_64-apple-darwin21.0)
>
> I don't understand the significance of the lines marked below.
> I am trying to use 'read' in a shell function.
>
> johnnonedoe@aol.com
>
>
> -----Original Message-----
> From: Lawrence Velázquez <larryv@zsh.org>
> To: johnnonedoe@aol.com
> Cc: zsh-workers@zsh.org
> Sent: Fri, Jul 29, 2022 12:40 pm
> Subject: Re: read -u n -t -k Does not work.
>
> On Fri, Jul 29, 2022, at 3:20 PM, johnnonedoe@aol.com wrote:
>> read -t -k
>> Works as expected.
>> read -u 0 -t -k
>> Blocks till return is typed.
>
> I don't see this behavior.
>
>     % zsh --version
>     zsh 5.9 (x86_64-apple-darwin18.7.0)
>     % zsh -fc 'read -t -k'           <================
>     % zsh -fc 'read -u 0 -t -k'   <================
>     %

Those lines run your commands in clean shells.  They are supposed
to demonstrate that I am not seeing the behavior that you are seeing.
I also don't see it using a function in an older version of zsh.

    % /bin/zsh --version
    zsh 5.3 (x86_64-apple-darwin18.0)
    % /bin/zsh -fc '() { read -u 0 -t -k }'
    %

-- 
vq


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-29 23:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-29 19:20 read -u n -t -k Does not work johnnonedoe
2022-07-29 19:40 ` Lawrence Velázquez
     [not found]   ` <549595162.4093300.1659133992108@mail.yahoo.com>
2022-07-29 22:57     ` Lawrence Velázquez

Code repositories for project(s) associated with this 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).