Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Odd behavior with various (q) array modifiers and non-printable characters (backspace, newline)
- X-seq: zsh-users 26918
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zach Riggle <zachriggle@xxxxxxxxx>
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Odd behavior with various (q) array modifiers and non-printable characters (backspace, newline)
- Date: Wed, 11 Aug 2021 14:16:06 -0700
- Archived-at: <https://zsh.org/users/26918>
- In-reply-to: <CAMP9c5k=MRwfuR_xNzJjUAMO8ds7Kr=OpM2QMD9+A9hLKHu3iw@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CAMP9c5k=MRwfuR_xNzJjUAMO8ds7Kr=OpM2QMD9+A9hLKHu3iw@mail.gmail.com>
On Wed, Aug 11, 2021 at 1:29 PM Zach Riggle <zachriggle@xxxxxxxxx> wrote:
>
> Hello all! It's me again, hopefully with a useful question.
You need to stop testing things with "echo". The "echo" builtin
interprets some backslash escapes itself, which will confuse you about
what the quoting options have done.
Repeat all your tests instead with
printf "%s\n" ${(q)...}
and so on, and come back if you still have questions.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author