[Grml] zsh history completion via arrow keys

Frank Terbeck ft at grml.org
Thu Jan 24 10:11:51 CET 2013

John wrote:
>>   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
> One last question for you, Frank.  In the interest of maintaining a minimal
> configuration, are all 8 lines required for this functionality?  My setup is

Well, you _could_ leave out the two lines that contain bindings for
'\eOA' and '\eOB'. But those make things work in more terminals. So you
should probably keep them anyway.

> the out-of-the-box grml configuration:
> *Unmodified /etc/zsh/zshrc

That one you need. And you shouldn't modify it indeed.

> *Unmodified /etc/skel/.zshrc (in my $HOME)

This one, you could leave out, because it's just a set of examples, that
are all commented out...

> *8 line $HOME/.zshrc.local

...and since you should do all modifications via this file, you should
also put those examples from the skel file into .zshrc.local.

Regards, Frank

In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925

More information about the Grml mailing list