[Grml] zsh history completion via arrow keys

John da_audiophile at yahoo.com
Wed Jan 23 22:28:07 CET 2013

> Meh. This is what I get for not trying things out...

>   autoload -Uz up-line-or-beginning-search
>   zle -N up-line-or-beginning-search
>   autoload -Uz down-line-or-beginning-search
>   zle -N down-line-or-beginning-search
>   bindkey '\eOA' up-line-or-beginning-search
>   bindkey '\e[A' up-line-or-beginning-search
>   bindkey '\eOB' down-line-or-beginning-search
>   bindkey '\e[B' down-line-or-beginning-search
> There seems to be a cosmetic bug that triggers the first time you use
> either of those (if you got warn_create_global set, which I do):
> up-line-or-beginning-search:15: scalar parameter __savecursor created globally 
> in function
> up-line-or-beginning-search:16: scalar parameter __searching created globally in 
> function
> you can do the following until you get a fixed up zsh version:
>   typeset -g __savecursor __searching

The 8 lines you posted works without the typeset bit.  Thank you. I think others would like this functionality.  Perhaps add it as a the grml default?

More information about the Grml mailing list