cygwin terminal shortcut up/down key half edited commands not recognized

200 Views Asked by At

I have a problem accessing partially matched commands in Cygwin using the up/down keys. Partially entering a command and hitting the up/down keys just loops through the entire history.

Please let me know how to search for previous commands using a partially entered command. Do I have to add anything to .bashrc?

1

There are 1 best solutions below

0
On

To search for matching commands in history, the key-stroke is ctrl + r : link to manual.

UP/DOWN keys are used to navigate the history.

However, if you want, you can change the key-bindings using the built-in command: bind.

e.g. Below command maps ^Y to reverse search history. ^Y is typed as ctrl+Vctrl+Y

bind '"^Y": reverse-search-history'