Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Why does {..} expansion using 'bindkey' quoting, but {,} and BRACE_CCL don't quote at all?
- X-seq: zsh-workers 49238
- From: Marlon Richert <marlon.richert@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- 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
- Archived-at: <https://zsh.org/workers/49238>
- List-id: <zsh-workers.zsh.org>
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"?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author