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

Re: History Up key



Bart Schaefer wrote:
>Obviously, though, users want it, or all those vi clones wouldn't have put
>in hacks to make it work.

Yes, we should make it easy to get the arrow key bindings.
It should be easy to have either behaviour, whatever the default is.
We should be aiming for a situation where the interested user only
needs to add a single command, either "create_arrow_key_bindings" or
"remove_arrow_key_bindings", in their .zshrc -- the command should be
a zsh function in the distribution.

>>     With that heuristic in
>>     place, the only problem with adaption is the issue of programmatically
>>     knowing where those bindings are.
>
>Which should be easier with the termcap and terminfo modules ...

Easier, but putting in heuristics such that arrow key sequences from
terminfo may or may not be bound makes it more difficult.  If arrow keys
are bound by default, then the shell code to turn them off is going to
have to exactly duplicate the logic of the C code that turns them on.
Btw, what happens to these bindings if $TERM gets changed?

This difficulty with turning off the bindings is why I suggest that the
bindings should be off by default -- it's easier to have only one copy
of the logic, in some shell code that creates the bindings.

>Should I commit my zkbd script?  If so, where -- under Misc/ ?

It looks useful.  Misc makes some kind of sense, but I'd put it under
Functions.

-zefram



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