From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5016 invoked from network); 4 Jul 1998 19:01:15 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 4 Jul 1998 19:01:15 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id OAA02724; Sat, 4 Jul 1998 14:47:43 -0400 (EDT) Resent-Date: Sat, 4 Jul 1998 14:47:28 -0400 (EDT) Message-ID: <19980704134902.A23665@emsphone.com> Date: Sat, 4 Jul 1998 13:49:02 -0500 From: Dan Nelson To: johan_sundstrom@bigfoot.com, zsh mailinglist Subject: Re: Zle "ctrl-v" quoting bug? References: <359E5734.5232B667@bigfoot.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mutt 0.92.13i In-Reply-To: =?iso-8859-1?Q?=3C359E5734=2E5232B667=40bigfoot=2Ecom=3E=3B_from_=22Joha?= =?iso-8859-1?Q?n_Sundstr=F6m=22_on_Sat_Jul__4_18:24:20_GMT_1998?= X-OS: FreeBSD 2.2.6-STABLE Resent-Message-ID: <"16LE-3.0.wf._Yddr"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1663 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu In the last episode (Jul 04), Johan Sundström said: > I finally managed to bind shift-tab to reverse-menu-complete in Linux > console mode, through tweaking a bit with my keymap and binding > meta-tab to shift-tab. However, when trying to quote alt-tab using > control-v alt-tab, an escape character is quoted (^[), and a beep is > sent to the speaker, instead of generating the entire sequence ^[^I. > How is that? > > Similarly, I can't quote the tab character this way. Control-v tab or > control-v control-i generates an unquoted tab It's doing exactly what you asked for: Control-V just inserts the very next key into the buffer, without parsing it. "^V Tab" sticks a raw tab into your commandline (instead of trying to do a menucomplete). "^V ESC" sticks a raw escape into your commandline, but since you can't usually see an escape, it prints "^[" instead. Not that this is not the two characters ^ and [, but one ESC character, printed so you can see it. If you try to "insert" an "ESC Tab" combo, the ^V only applies to the ESC, since zsh has no idea that you redefined SHIFT-Tab to send two control characters. The only reason that things like "^V DOWN" or "^V F1" work is that only the first character in those sequences is a zsh-special character that needs to be inserted via ^V. You might want to bind SHIFT-Tab to "ESC [ Z", which seems to be the ANSI standard escape sequence for "Cursor Backward Tab", and add the following to your termcap entry (if it's not already there): "bt=\E[Z". Then add bindkey ${$(echotc bt 2>&-):-"^[[Z"} reverse-menu-complete to your startup file. That'll let other terminals redefine backtab if necessary, but will default to "ESC [ Z" if the 'bt' capability is missing. -Dan Nelson dnelson@emsphone.com