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

Re: Binding Home and End

On 29 January 2010 22:41, Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx> wrote:
> 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?

I imagine it would at least break lots of keybinds for people who don't use

Mikael Magnusson

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