Once, a colleague of mine shown me a very useful method (shortcut?) on a shell (bash? csh?) to, after executing a previous command, automatically show the command after in history.
For example, here's my history:
$ ...
$ cd /var
$ cd www
$ ...
Then I pressed the up key to show cd /var
, executed it a certain way then the prompt automatically displayed cd www
.
Sorry, I can't remember more details, but that's why i'm asking... any idea?