zsh-workers
 help / color / mirror / code / Atom feed
From: Marlon Richert <marlon.richert@gmail.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Why does {..} expansion using 'bindkey' quoting, but {,} and BRACE_CCL don't quote at all?
Date: Wed, 4 Aug 2021 10:04:56 +0300	[thread overview]
Message-ID: <CAHLkEDsib=h6_44ZO0CBC-XxbbPi7Wvypi8JKwaRa1uS9uK__w@mail.gmail.com> (raw)

For example:

% print -r -- ${(q+):-{$'\C-['..$'\C-]'}}
'^[' '^\' '^]'
% print -r -- ${(q+):-{$'\C-[',$'\C-]'}}
$'\C-[' $'\C-]'
% setopt braceccl
% print -r -- ${(q+):-{$'\C-['-$'\C-]'}}
$'\C-[' $'\C-\' $'\C-]'
%

Is there a reason for this inconsistency? Why not always produce
quoted or unquoted output?

Also, why bindkey-style quoting? Wouldn't ${(q+)}-style quoting be
more convenient, since it's more straightforward to "unquote"?


             reply	other threads:[~2021-08-04  7:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04  7:04 Marlon Richert [this message]
2021-08-04 15:52 ` Bart Schaefer
2021-08-05  6:17   ` Marlon Richert
2021-08-05 23:36     ` Bart Schaefer
2021-08-06  0:55       ` Mikael Magnusson
2021-08-06  3:08         ` Bart Schaefer
2021-08-07 19:35         ` Marlon Richert
2021-08-08  0:09           ` Mikael Magnusson
2021-08-10 19:21             ` Marlon Richert

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='CAHLkEDsib=h6_44ZO0CBC-XxbbPi7Wvypi8JKwaRa1uS9uK__w@mail.gmail.com' \
    --to=marlon.richert@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).