From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28100 invoked from network); 19 Jan 2005 17:38:24 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 19 Jan 2005 17:38:24 -0000 Received: (qmail 88130 invoked from network); 19 Jan 2005 17:38:18 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 19 Jan 2005 17:38:18 -0000 Received: (qmail 2869 invoked by alias); 19 Jan 2005 17:37:50 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8399 Received: (qmail 2854 invoked from network); 19 Jan 2005 17:37:49 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 19 Jan 2005 17:37:49 -0000 Received: (qmail 86507 invoked from network); 19 Jan 2005 17:36:50 -0000 Received: from out004pub.verizon.net (HELO out004.verizon.net) (206.46.170.142) by a.mx.sunsite.dk with SMTP; 19 Jan 2005 17:36:43 -0000 Received: from candle.brasslantern.com ([4.11.10.129]) by out004.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20050119173641.NCHP8290.out004.verizon.net@candle.brasslantern.com> for ; Wed, 19 Jan 2005 11:36:41 -0600 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 j0JHaapU003637 for ; Wed, 19 Jan 2005 09:36:36 -0800 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id j0JHaapN003636 for zsh-users@sunsite.dk; Wed, 19 Jan 2005 09:36:36 -0800 From: Bart Schaefer Message-Id: <1050119173635.ZM3635@candle.brasslantern.com> Date: Wed, 19 Jan 2005 17:36:35 +0000 In-Reply-To: <200501191422.j0JEMfxA020496@news01.csr.com> Comments: In reply to Peter Stephenson "Re: The old backspace/delete problem" (Jan 19, 2:22pm) References: <87ekghftq7.fsf@eddy.tactio.lan> <200501191422.j0JEMfxA020496@news01.csr.com> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-users@sunsite.dk Subject: Re: The old backspace/delete problem MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Authentication-Info: Submitted using SMTP AUTH at out004.verizon.net from [4.11.10.129] at Wed, 19 Jan 2005 11:36:37 -0600 X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 On Jan 19, 2:22pm, Peter Stephenson wrote: } Subject: Re: The old backspace/delete problem } } Boyd Adamson wrote: } > alias ^?='stty erase ^?' } > alias ^H='stty erase ^H' } > } > Any ideas on how we could do this sort of auto-detection in zsh? } } It's doable; there's a slight catch, but I think I've managed to make it } almost invisible to the user. That's a pretty cute trick, Peter. I think it still runs into problems with "ttyctl -f", though? I have this little function in my .zlogin file: function stty_backspace { local bs while (( #bs != 8 && #bs != 127 )) do print -n 'Press backspace: ' read -k 1 bs || return 1 print -nP '\r%E' done stty erase "$bs" } I invoke that (still in .zlogin) if various other tests for the type of terminal and host operating system fail to intuit the correct value. (Those tests are dependent on knowledge of hardware/OSs on my LAN, so it's not useful to post them here.) This means that I sometimes get an extra prompt on login, but it also means that I can be sure to run it before ttyctl. I like your idea better, though. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net