From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19187 invoked from network); 11 Feb 2006 05:15:26 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 11 Feb 2006 05:15:26 -0000 Received: (qmail 29503 invoked from network); 11 Feb 2006 05:15:19 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 11 Feb 2006 05:15:19 -0000 Received: (qmail 12577 invoked by alias); 11 Feb 2006 05:15:12 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9912 Received: (qmail 12568 invoked from network); 11 Feb 2006 05:15:11 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 11 Feb 2006 05:15:11 -0000 Received: (qmail 28373 invoked from network); 11 Feb 2006 05:15:11 -0000 Received: from vms040pub.verizon.net (206.46.252.40) by a.mx.sunsite.dk with SMTP; 11 Feb 2006 05:15:09 -0000 Received: from candle.brasslantern.com ([71.116.81.225]) by vms040.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IUI00CVRBX73K69@vms040.mailsrvcs.net> for zsh-users@sunsite.dk; Fri, 10 Feb 2006 23:15:08 -0600 (CST) Received: from candle.brasslantern.com (IDENT:schaefer@localhost [127.0.0.1]) by candle.brasslantern.com (8.12.11/8.12.11) with ESMTP id k1B5F6Uv005309 for ; Fri, 10 Feb 2006 21:15:07 -0800 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id k1B5F6di005308 for zsh-users@sunsite.dk; Fri, 10 Feb 2006 21:15:06 -0800 Date: Sat, 11 Feb 2006 05:15:06 +0000 From: Bart Schaefer Subject: Re: backspace => ^? in remote vi under screen, all shells zsh In-reply-to: <7c737f300602101745u7b3f8329l6700ada175769353@mail.gmail.com> To: zsh-users@sunsite.dk Message-id: <1060211051506.ZM5307@candle.brasslantern.com> MIME-version: 1.0 X-Mailer: Z-Mail (5.0.0 30July97) Content-type: text/plain; charset=us-ascii References: <7c737f300602101745u7b3f8329l6700ada175769353@mail.gmail.com> Comments: In reply to Deliverable Mail "backspace => ^? in remote vi under screen, all shells zsh" (Feb 10, 5:45pm) On Feb 10, 5:45pm, Deliverable Mail wrote: } } I have this annoying problem -- in my local zsh and screen everything is } OK. But when I log into certain Red Hat 7.2 boxen from a window in that } screen, and start vi, backspace produces ^?. The trouble here is that all applications on both ends of the remote shell connection have to agree on (a) what key value produces the effect of "erase the character left of the cursor" and (b) what key value is sent by the backspace key. At some point during the RH6.x series, the default for the backspace key was switched (I don't recall in which direction ... I think from ^H to ^? but I may be wrong). This is a low-level setting, in the console driver if you're not using X11 or the X key bindings if you are, and is not controllable by the shell's key binding mechanism. } Note that *remote* shell is } zsh and backspace in its command line works just fine. That's because zsh treats ^? and ^H as interchangable unless you have explicitly bindkey'd it otherwise. "Real" vi also used to do so, but vim (the open-source vi clone favored by RH) does not. } I wonder whether this is a problem which can be fixed on zsh's own } bindkey level? You *might* be able to fix it by fooling around with "stty erase" on the remote and/or local system, but exactly what you need to do depends on which system is remote and which is local and might change for any given pairing.