From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1266 invoked from network); 24 Mar 1998 18:09:57 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 24 Mar 1998 18:09:57 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id NAA29551; Tue, 24 Mar 1998 13:06:47 -0500 (EST) Resent-Date: Tue, 24 Mar 1998 13:06:47 -0500 (EST) From: "Bart Schaefer" Message-Id: <980324100603.ZM6989@candle.brasslantern.com> Date: Tue, 24 Mar 1998 10:06:03 -0800 X-Mailer: Z-Mail (4.0b.820 20aug96) To: zsh-workers@math.gatech.edu Subject: More bindkey weirdness in 3.0.5 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"UNcV02.0.dD7.tO_5r"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3814 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu You can probably guess what got me started on this. Anyway, consider the output of the following function (which must be run in a freshly-started zsh -f or it is likely to exit prematurely due to the previous bug): bindfoo () { bindkey -v # If the next line is uncommented, zsh crashes a few commands later # bindkey -r '\e' echo +++ BEGIN +++ ; bindkey bindkey -r '\e[A' bindkey -r '\e[B' bindkey -r '\e[C' bindkey -r '\e[D' echo +++ REMOVED +++ ; bindkey bindkey "[A" up-line-or-history bindkey "[B" down-line-or-history bindkey "[C" forward-char bindkey "[D" backward-char echo +++ ADDED 1 +++ ; bindkey bindkey -a "[A" up-line-or-history bindkey -a "[B" down-line-or-history bindkey -a "[C" forward-char bindkey -a "[D" backward-char echo +++ ADDED 2 +++ ; bindkey bindkey -a '\e[A' up-line-or-history bindkey -a '\e[B' down-line-or-history bindkey -a '\e[C' forward-char bindkey -a '\e[D' backward-char echo +++ ADDED 3 +++ ; bindkey bindkey -e } Following "+++ BEGIN +++", we have (in part): "^[" prefix "^[" vi-cmd-mode "^[[A" up-line-or-history "^[[B" down-line-or-history "^[[C" forward-char "^[[D" backward-char Following "+++ REMOVED +++" (so far so good): "^[" vi-cmd-mode Following "+++ ADDED 1 +++" (first bug): "^[" vi-cmd-mode "[" prefix "[A" self-insert <--- WHAT? "[B" down-line-or-history "[C" forward-char "[D" backward-char Following "+++ ADDED 2 +++" (where'd "[A" go?): "^[" vi-cmd-mode "[" prefix "[B" down-line-or-history "[C" forward-char "[D" backward-char Finally, following "+++ ADDED 3 +++': "^[" vi-cmd-mode "[" prefix "^[[A" vi-cmd-mode <-- WHAT? "^[[B" down-line-or-history "^[[C" forward-char "^[[D" backward-char "[B" down-line-or-history "[C" forward-char "[D" backward-char -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com