zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: David Milum <david.milum.89@gmail.com>
Cc: zsh-workers@zsh.org
Subject: Re: read -r flag not working on 5.8.1
Date: Sun, 8 Aug 2021 07:59:20 +0200	[thread overview]
Message-ID: <CAHYJk3RGQh==kYGy4SN4LrrN7t6hDO3Ayc4YF1-7RNZLCKkZtA@mail.gmail.com> (raw)
In-Reply-To: <CALaXwKN_dZjtwUZvHF5fQFguOH1zkMhENDtP_zkOOaKxBm9=3Q@mail.gmail.com>

On 8/8/21, David Milum <david.milum.89@gmail.com> 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@gmail.com>
> 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


  reply	other threads:[~2021-08-08  5:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-08  5:38 David Milum
2021-08-08  5:53 ` David Milum
2021-08-08  5:59   ` Mikael Magnusson [this message]
2021-08-08 14:04     ` Stephane Chazelas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHYJk3RGQh==kYGy4SN4LrrN7t6hDO3Ayc4YF1-7RNZLCKkZtA@mail.gmail.com' \
    --to=mikachu@gmail.com \
    --cc=david.milum.89@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).