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

Re: Binding Home and End



Peter Stephenson wrote:
> On Wed, 27 Jan 2010 18:58:43 +0200
> "Nadav Har'El" <nyh@xxxxxxxxxxxxxxxxxxx> wrote:
>> I wonder - shouldn't ZLE also switch to application mode and leave this
>> mode when editing is complete (to run a command)?
>
> I can't imagine changing the normal behaviour will lead to anything
> other than chaos, but there is a simple way of making the shell do this
> for you:
>
> zle-line-init() { echoti smkx; }  
> zle-line-finish() { echoti rmkx; }
> zle -N zle-line-init
> zle -N zle-line-finish
>
> which seemed to do what I expected.

Any reason why this would "lead to anything other than chaos"? I think
this is the correct way to do this. Without it, relying on information
from terminfo to bind keys cannot work too well.

Is there any potential part of the shell that could break if what the
above functions did were the default behaviour?

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



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