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

Re: [BUG?] $terminfo weirdness



On Tue, May 11, 2021 at 1:02 PM Marlon Richert <marlon.richert@xxxxxxxxx> wrote:
>
> % print -r -- ${(@kvq+)terminfo[(I)kLFT*]}
> kLFT $'\C-[[1;2D'
> % print -r -- ${(@kvq+)terminfo[(I)kLFT]}
> kLFT $'\C-[[1;2D'
> % print -r -- ${(@kvq+)terminfo[(I)kLFT5]}
>
> % print -r -- ${(@kvq+)terminfo[kLFT5]}
> $'\C-[[1;5D'
> %
>
> What's going on here?

I'm surprised that (kv) works with (I) in the first place. It looks
useful but is this documented somewhere?

  % typeset -A x=(a1 1 a2 2 b 3)
  % print -r -- ${x[(I)a*]}
  a1 a2
  % print -r -- ${(kv)x[(I)a*]}
  a1 1 a2 2

Roman.




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