Bash MinGW ignoring Ctrl+O key combination

1

In Bash MinGW on Windows 7, I would like to use Ctrl+O to perform a history search backward. However, I can't get this work -- i.e., this line in my ~/.inputrc does nothing (although it does work on a unix system I have access to):

"\C-o": history-search-backward

Using the Up key is ok, i.e. this works:

"\e[A": history-search-backward

I know that the terminal application (Console2) is not capturing the Ctrl+O, since I can map Ctrl+O to various things in terminal vim (launched from MinGW bash in Console2).

Anyone know why Ctrl-O is being ignored in Bash MinGW?

mjeppesen

Posted 2014-02-27T00:52:17.907

Reputation: 133

2I'll bet Ctrl-S and Ctrl-Q don't work either. Most likely that these characters are being used for flow control. When vim runs, it turns this off, but bash does not. If you were running on Unix, you'd be able to use stty to disable this, but I haven't figured out how to disable this in Windows. BTW there doesn't seem to be a problem with Ctrl-P. – jdigital – 2014-02-27T03:05:58.280

Thanks, that sounds right. I found this answer on the Apple site where you can use stty discard undef to make Ctrl+O work in mac terminal, but it doesn't work on Windows. (http://apple.stackexchange.com/questions/3253/ctrl-o-behavior-in-terminal-app). And you were right about Ctrl-P working, so I edited the question title. And sorry I can't vote up your comment, insufficient rep.

– mjeppesen – 2014-02-27T04:13:05.367

No answers