rpavlik/git-windows-mintty

Install readline configuration for mintty in a `inputrc`

hickford opened this issue · 1 comments

To work well with Bash (which presumably most users of this program are), Mintty needs readline commands installed in an inputrc . Otherwise, Mintty is broken out-the-box.

Alas presently users are asked to do so by hand! Which is tedious (plus users might not even know they have to do this) http://code.google.com/p/mintty/wiki/Tips#Readline_configuration

# Ctrl+Left/Right to move by whole words
"\e[1;5C": forward-word
"\e[1;5D": backward-word

# Ctrl+Backspace/Delete to delete whole words
"\e[3;5~": kill-word
"\C-_": backward-kill-word

# Ctrl+Shift+Backspace/Delete to delete to start/end of the line
"\e[3;6~": kill-line
"\xC2\x9F": backward-kill-line  # for UTF-8
#"\x9F": backward-kill-line     # for ISO-8859-x
#"\e\C-_": backward-kill-line   # for any other charset

# Alt-Backspace for undo
"\e\d": undo

This installer could improve this by doing it for users. By adding these lines to ~/.inputrc or C:\Program Files (x86)\Git\etc\inputrc


I also note that /etc/inputrc/ had a case insensitivity line in it, but it didn't have any effect until I copied it to my own ~/.inputrc . Weird.

# case insensitive
set completion-ignore-case on

I didn't even know how to do this - thanks for figuring this out!