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

Re: read -r flag not working on 5.8.1



On 8/8/21, David Milum <david.milum.89@xxxxxxxxx> wrote:
> Disregard, and apologies for the noise. I understand now -r is not the same
> as in bash. Should have clued me in when it didn't work on my mac.
>
> On Sun, Aug 8, 2021 at 1:38 AM David Milum <david.milum.89@xxxxxxxxx>
> wrote:
>
>> Hello, seems like the -r (raw mode) flag which should prevent it from
>> interpreting backslashes is not working? My understanding is the
>> following
>> example shouldn't clear the "CLEAR" part. I can also demonstrate with new
>> lines.
>>
>> $ read -r TEST
>> asd\c CLEAR
>> $ echo $TEST
>> asd
>> $ zsh --version
>> zsh 5.8 (x86_64-pc-linux-gnu)

Your problem is not read, but echo. Try the above with echo -E $TEST
instead and you will see the read command is fine.

-- 
Mikael Magnusson




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