20
11
In bash, the home/end/delete key is inserting a tilde, or if preceded by escape key: [1~
So I type echo hellp
, move cursor to hel|lp
and type delete, and bam, i got ~tilde
Also, I type echo hellp
, move cursor to hel|lp
and type esc then delete, and bam, I got [3~
$ echo hel~lp
hel~lp
$ echo hell[3~o
hell[3~o
~
My version of bash:
$ bash --version
GNU bash, version 3.1.17(1)-release (i686-pc-msys)
Copyright (C) 2005 Free Software Foundation, Inc.
What I want is behavior like cmd.exe
:
- I want Esc to clear the current line / buffer
- I want Home to move cursor to start of line before first character
- I want End to move cursor to end of line before first character
- I want delete to delete the next character (right of cursor) from current line/buffer
What do I have to edit to fix this? Is this default on your bash?
update: i'm on a windows machine running a windows program, sh.exe ( as you can see above GNU bash), compiled with mingw for msys:
$ uname -s -m -o
MINGW32_NT-5.1 i686 Msys
windows, no terminal emulator, msys.bat, if I knew how to report the setting, I wouldn't be asking how to set them – optional – 2013-02-16T03:39:43.780