views:

140

answers:

3

I can't delete the last character in a given line in the MySQL CLI, if I press "END", it will jump on the character and if I press "DEL", it will delete the char before that (like backspace).

Does anybody know a fix for that issue?

I use MySQL 5.1.31-1ubuntu2-log with normal shell access.

Thank you for assistance!

A: 

Erm ... Use cursor keys?

Martin Hohenberg
that would be.... to easy! no they didn't work.
smint
Well, you check the easy things first. Glad you got that one fixed.
Martin Hohenberg
A: 

I heard recently that Shift-Del or Shift-Backspace works on some systems (mainly Mac), perhaps it can be used as a workaround for Ubuntu too?

Update: Does the End + Del/BS work normally when you're not inside MySQL prompt?

Abel
thank you, the comment from simon fixed it!!
smint
+2  A: 

The problem appears different on Linux/Windows.

Our solution was to add this line to ~/.editrc

bind -e

to see how editrc works:

https://www.mirbsd.org/htman/i386/man5/editrc.htm

Simon
+1 excellent find!
Abel