X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=3.6 required=5.0	tests=AWL,BAYES_40,BOTNET,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE
X-Spam-Check-By: sourceware.org
Message-id: <4FE210E7.6070707@cygwin.com>
Date: Wed, 20 Jun 2012 14:05:27 -0400
From: "Larry Hall (Cygwin)" <reply-to-list-only-lh@cygwin.com>
Reply-to: cygwin@cygwin.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1
MIME-version: 1.0
To: cygwin@cygwin.com
Subject: Re: Backspace
References: <jrsqk5$n02$1@dough.gmane.org>
In-reply-to: <jrsqk5$n02$1@dough.gmane.org>
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On 6/20/2012 11:35 AM, Andrew DeFaria wrote:
> Have you ever had the backspace key not go backward on character erasing the
> previous character in Windows programs? Neither have I.
>
> This has been bothering me for a while so... I have properly set stty erase
> ^h and from the bash command line backspace works as expected. But I often
> find places where this setting is not honored. I have an example. If I type
> less <filename> and at the less prompt I type "/' to find a string, but then
> make a mistake and hit backspace I get ^? instead. But ^h works. Why? Even
> the man page for less says that backspace is supposed to delete the
> character to the left of the cursor but instead I just get ^?.

I see the same thing if I set stty erase (in bash) as you did and start a
new shell (bash again) from it.  Of course, the parent shell outputs ^? for
any press of backspace.  This behavior is the same for bash started from a
command prompt and from mintty.

Beyond personal preference, is there a reason that you don't just take the
default (i.e. don't set stty erase)?  That works for me.

-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

