Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Binding Home and End
- X-seq: zsh-users 14760
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Binding Home and End
- Date: Sun, 31 Jan 2010 20:10:22 +0000
- In-reply-to: <87iqajsulg.fsf@xxxxxxxxxxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20100127165843.GA4832@xxxxxxxxxxxxxxxxxxxxxxxxxx> <20100128213354.0dd08dd2@pws-pc> <87mxzwsi54.fsf@xxxxxxxxxxxxxxxxxxxxxx> <237967ef1001291351h6ce2d3b4o8204833df57e2ccb@xxxxxxxxxxxxxx> <87iqajsulg.fsf@xxxxxxxxxxxxxxxxxxxxxx>
On Sat, 30 Jan 2010 12:25:15 +0100
Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx> wrote:
> Mikael Magnusson wrote:
> > On 29 January 2010 22:41, Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx> wrote:
> >> Peter Stephenson wrote:
> [...]
> >>> zle-line-init() { echotgi smkx; }
> >>> zle-line-finish() { echoti rmkx; }
> [...]
> >> 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
> > terminfo.
>
> Yes, of course. :)
> I was rather getting at whether doing this was likely to break something
> like menu-selection or something similar. I don't think it would, but
> Peter's mention about "chaos" made me a little uneasy.
Compatibility was really my only worry... congratulations if you've
puzzled out terminal application cursor / keypad modes, but I suspect
99.something % of shell users just look at what sequences a key happens
to be sending and bind their functions to that, so it wouldn't be a good
idea to tinker with those now.
(Although it's certainly arguable, it's not completely clear that a
shell's line editor is an "application" in the strict sense, the whole
distinction being a not very happy historical accident in the first
place. The way shells evolved means that to begin with they were just
using raw input; at some point they crossed the boundary to become
something more sophisticated. The simple application / raw distinction
doesn't really fit.)
If you're not relying on the particular O / [ key sequence you're
getting at the moment, however, as far as I know the shell code I gave
should work fine for you (obviously, do let us know if you find a
problem).
This is probably worth mentioning in the FAQ.
--
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author