Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: read -r flag not working on 5.8.1
- X-seq: zsh-workers 49261
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: David Milum <david.milum.89@xxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: read -r flag not working on 5.8.1
- Date: Sun, 8 Aug 2021 07:59:20 +0200
- Archived-at: <https://zsh.org/workers/49261>
- In-reply-to: <CALaXwKN_dZjtwUZvHF5fQFguOH1zkMhENDtP_zkOOaKxBm9=3Q@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CALaXwKNkYJJyfM2S+xWN15u8LA_ty7aa+r1ZFvSGNjskxk5Wnw@mail.gmail.com> <CALaXwKN_dZjtwUZvHF5fQFguOH1zkMhENDtP_zkOOaKxBm9=3Q@mail.gmail.com>
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