Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

backspace does not work git bash

Tags:

git-bash

perl

The first time I used git bash, backspace was working fine. Then I installed Perl and didn't use git bash for a few days.

When I use backspace in git bash now it doesn't work correctly.

For example, trying to remove the second s and everything after it in ussers:

Git bash example

Now when I use the backspace this happens:

git bash example backspace

Can anyone help?

like image 491
A. VA Avatar asked Feb 21 '17 16:02

A. VA


1 Answers

I had this same problem today after switching to mintty with a fresh version of git. In my case, it was an old .bashrc file I'd been carrying around for many years with the line export TERM=ansi. After removing that and starting a new bash, everything works again.

More generally, to debug, I was suspicious of all the dot-config stuff in my home directory--so I moved things like .bash_profile, .bashrc, .inputrc, etc. into a temporary directory where they wouldn't be read by bash. Then, I started bash and saw that it worked. I mention it because, if it isn't specifically the TERM issue I had, you might be able to debug using the same technique.

like image 90
Penny Avatar answered Sep 19 '22 01:09

Penny