Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: up-arrow no longer works right
- X-seq: zsh-users 13949
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: Zsh Users List <zsh-users@xxxxxxxxxx>
- Subject: Re: up-arrow no longer works right
- Date: Fri, 20 Mar 2009 14:37:58 +0100
- Cc: TjL <luomat@xxxxxxxxx>
- In-reply-to: <20090320071556.GA63370@xxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Zsh Users List <zsh-users@xxxxxxxxxx>, TjL <luomat@xxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <d2ecb10b0903191838y68e1dfbbsa80289a52256eb2a@xxxxxxxxxxxxxx> <20090320024835.GA64103@xxxxxxxxxxxxxxxxxxxx> <d2ecb10b0903192303h1f9b0487g335cd5335f708ff@xxxxxxxxxxxxxx> <20090320071556.GA63370@xxxxxxxxxxxxxxxxxxxx>
On 2009-03-20 00:15:57 -0700, Phil Pennock wrote:
> So, if you want the up-key to always invoke a particular widgit, then
> you need to bind *two* different escape sequences: both the normal \e[A
> and also \eOA (where the escape sequence ESC is in more modern
> environments written \e but in older setups is written ^[ instead).
Alternatively, I think that something like
[[ -n $TTY && -n $terminfo ]] && print -n "$terminfo[rmkx]" > $TTY
in precmd() should work around this problem.
Also, I've recently had a problem with the arrow keys after typing
Ctrl-Z (to background a graphical application) and "bg": sometimes
the escape sequences are output to the terminal, even though they
are interpreted by zsh; typing [Enter] is sufficient to get the
normal behavior back.
For instance:
vin:~> emacs file1 <14:28:38
^Zzsh: suspended eclient file1
zsh: exit 20
vin:~[20]> bg <14:28:47
[1] + continued eclient file1
vin:~> <14:28:48
[1] + done eclient file1
vin:~> emacs file1 <14:28:51
^Zzsh: suspended eclient file1
zsh: exit 20
vin:~[20]> bg <14:28:54
[1] + continued eclient file1
vin:~> ^[[A^[[A^[[A <14:28:55
bg
bg: job already in background
As you can see, there's no problem after the first bg. But after the
second one, I get a ^[[A (in normal characters, so this is not like
quote-insert, where ^[ appears in reverse video) for each up-arrow.
When I hit [Enter], one can see that zsh recalled the first "bg"
command from the history.
This is with the zsh 4.3.9-3 Debian package.
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author