Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Why does {..} expansion using 'bindkey' quoting, but {,} and BRACE_CCL don't quote at all?



On 8/7/21, Marlon Richert <marlon.richert@xxxxxxxxx> wrote:
> On Fri, Aug 6, 2021 at 3:55 AM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>>
>> On 8/6/21, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>> > On Wed, Aug 4, 2021 at 11:18 PM Marlon Richert
>> > <marlon.richert@xxxxxxxxx>
>> > wrote:
>> >>
>> >> I just wish {a..z} didn't use quoting at all. :)
>> >
>> > Re-reading the doc for this, {a..z} is guaranteed to produce PRINTABLE
>> > output, which is not true of the other variations of brace expansion.
>>
>> If you want to expand these printable representations to the actual
>> codepoints, you can use (g:ce:) .
>
> Thanks! I had been looking through
> https://zsh.sourceforge.io/Doc/Release/Expansion.html for anything
> mentioning `bindkey`, but couldn't find any. :)
>
>> With the c option, sequences like ‘^X’ are also processed.
>
> That could be made more "grep-able".
>
> In general, I think that page could really use a "reverse" index.
> Listing parameter flags by letter only doesn't really help in finding
> anything. Believe me, I've tried.

It is indeed always useful when the manpage happens to mention the
exact thing you're looking for, but if it did this in all places and
for everything everyone was looking for, it would be quite a bit
longer :). The documentation for the print builtin also doesn't
mention bindkey, which is why I didn't mention it in the documentation
for g::. The code also doesn't reference bindkey here, fwiw:

    case 'e':
	getkeys |= GETKEY_EMACS;
	break;
    case 'o':
	getkeys |= GETKEY_OCTAL_ESC;
	break;
    case 'c':
	getkeys |= GETKEY_CTRL;
	break;

(although GETKEYS_BINDKEY used presumably for bindkey, is defined as
the combination of exactly those three flags).

-- 
Mikael Magnusson




Messages sorted by: Reverse Date, Date, Thread, Author