Menu

#1934 Backspace key inserts ~ in Bash instead of backspacing

MSYS
closed
nobody
Support
works-for-me
User_Environment_Issue
False
2014-11-22
2013-03-01
mcandre
No

Backspace doesn't work correctly in Git Bash. It insterts a tilde (~) instead of deleting the previous character.

System:

$ specs bash git os
Specs:

specs 0.2
https://github.com/mcandre/specs#readme

bash --version
GNU bash, version 3.1.0(1)-release (i686-pc-msys)
Copyright (C) 2005 Free Software Foundation, Inc.

git --version
git version 1.8.0.msysgit.0

systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
OS Name: Microsoft Windows XP Professional
OS Version: 5.1.2600 Service Pack 3 Build 2600

Discussion

  • mcandre

    mcandre - 2013-03-01

    Correction: Backspace works fine, Delete exhibits this behavior.

     
  • Earnie Boyd

    Earnie Boyd - 2013-03-01
    • labels: bash, terminal, repl, keyboard, key, keys --> bash, terminal, repl, keyboard, erase
    • status: unread --> closed
    • type: Bug --> Support
    • resolution: none --> works-for-me
    • category: Unknown --> User_Environment_Issue
     
  • Earnie Boyd

    Earnie Boyd - 2013-03-01

    Which MSYS are you using again?

    If you're using the MSYS delivered by the msysgit project then you need to ask them for support or install our version of MSYS and remove the msys-1.0.dll from the msysgit bin directory.


    stty erase <BACKSPACE>
    

    Replace <BACKSPACE> by actually typing the BackSpace key.

     
  • Earnie Boyd

    Earnie Boyd - 2013-03-01

    For the Delete key you need to code you ~/.inputrc file for the key sequence.

     
  • Keith Marshall

    Keith Marshall - 2013-03-01

    FWIW, both backspace and delete work exactly as expected [1] for me, with both MSYS-1.0.17 on my Vista box, and MSYS-1.0.18 on my Win7 VM under Linux, bash-3.1.17(1) in both cases. (Both of these are MSYS installations, via mingw-get, from our MinGW.org repository on SourceForge).

    [1] By exactly as expected, I mean that backspace erases the character behind (i.e. to the left of) the cursor, while delete erases the character under (i.e. at the position of) the cursor.


    Earnie, in both of these installations the delete key generates the sequence "\e[3~". I see no reference to this sequence in ~/.inputrc, in either of my installation cases.


    Andrew, as Earnie has already stated, if you are using A. N. Other's (e.g. msysGit's) fork of MSYS, you really cannot expect us to support it; you need to ask them. However, you might consider the possibility that your ~/.inputrc maps the "\e[3" (or your equivalent) part of the key sequence, leaving the "~" to pass through. Beyond this, I have no more than this tid-bit of advice to offer.

     
  • mcandre

    mcandre - 2013-03-01

    msysGit says to pass the buck here, mingw says to pass the buck there...

    No, Delete key support should be out of the box. What kind of an
    application doesn't support pressing Delete?
    On Mar 1, 2013 9:55 AM, "Earnie Boyd" earnie@users.sf.net wrote:

    For the Delete key you need to code you ~/.inputrc file for the key
    sequence.


    Status: closed
    Labels: bash terminal repl keyboard erase
    Created: Fri Mar 01, 2013 02:15 PM UTC by Andrew Pennebaker
    Last Updated: Fri Mar 01, 2013 02:30 PM UTC
    Owner: nobody

    Backspace doesn't work correctly in Git Bash. It insterts a tilde (~)
    instead of deleting the previous character.

    System:

    $ specs bash git os
    Specs:

    specs 0.2
    https://github.com/mcandre/specs#readme

    bash --version
    GNU bash, version 3.1.0(1)-release (i686-pc-msys)
    Copyright (C) 2005 Free Software Foundation, Inc.

    git --version
    git version 1.8.0.msysgit.0

    systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
    OS Name: Microsoft Windows XP Professional
    OS Version: 5.1.2600 Service Pack 3 Build 2600


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/mingw/bugs/1934/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/prefs/

     
MongoDB Logo MongoDB