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

Re: read -u n -t -k Does not work.



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@xxxxxxx 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@xxxxxxx
>
>
> -----Original Message-----
> From: Lawrence Velázquez <larryv@xxxxxxx>
> To: johnnonedoe@xxxxxxx
> Cc: zsh-workers@xxxxxxx
> 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@xxxxxxx 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




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