

Next I use the up arrow, and it only finds for me commands that start with cd /, including this long one.ĭid you like this? Well, add the following code to your ~/.bashrc file # Auto-complete command from history So I type cd / in the terminal window (without hitting enter).

Lets say that I want to change directory to one of my recent projects. So far, this is the same as the default up arrow behavior. If you use the up arrow, you can navigate your command history. Lets say that you just requested a compute node with qrsh and you have an empty line. The following changes make it so that the up arrow searches only commands that start with exactly the letters you had already typed. Normally, the up and down arrow let you select previous commands from your bash history (up) or select one of your latest commands (down, after having used up). The next change will save you a lot of time! Plus it goes nicely with the bash history changes we just made.
