In git-bash when I hit delete it says "(arg: 3)" then the keyboard doesn't work correctly

2

I googled it and can't seem to find anything talking about it.

Basically if I'm at the prompt, and I've typed something, then arrow to delete something in the middle of it, when I hit delete the prompt changes to "(arg: 3)" followed by what I had typed.

At that point, most of the letters don't work. The "k" key acts like the up arrow and goes through the history.

If I hit the numbers, it changes the 3 in "(arg: 3)" to whatever numbers I type.

The x key acts like delete.

The w key jumps forward.

The p key types "s"

And v opens vi

If I just mash they keys eventually I can type again, or if I hit enter it will go to another line and act normal.

Any idea what it's doing and how to just make the delete key work?

phazei

Posted 2014-03-13T21:06:08.713

Reputation: 281

Answers

2

bash is going in vi mode.

Use set -o emacs to disable vi mode (actually this will set the mode to emacs mode which is normally the default).

Perhaps one of your configuration files changes the default. Check out the bash documentation for details on configuration (and just about anything else you can think of regarding bash).

jdigital

Posted 2014-03-13T21:06:08.713

Reputation: 861

But why in git-bash vi mode, is delete mapped to esc 3 instead of delete? And how can it be fixed? I've tried setting maps in .inputrc to no avail. – 79E09796 – 2016-11-25T10:37:02.300