In Matlab, there is a very nice feature that I like. Suppose I typed the command very-long-command and then a few several commands afterwards. Then later if I need the long command again, I just type very and press the up arrow key, my long command appears. It finds the last command that starts with very. I couldn’t do the same in unix command line, when I try to do it, it disregards whatever I typed, and goes back to the last commands in chronological order. Is there a way to do it?
In Matlab, there is a very nice feature that I like. Suppose I typed
Share
In bash, hitting ctrl–r will let you do a history search:
In the above snippet, I hit ctrl–r on the next line after
# many commands later..., and then typed ec which brought me back to the echo command. At that point hitting Enter will execute the command.