0

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?

Jon
  • 12,684
  • 4
  • 31
  • 44
royroy
  • 11

1 Answers1

0

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'
anishsane
  • 20,270
  • 5
  • 40
  • 73