Everyone knows (or should know!) that on a terminal the up and down arrow keys are used to navigate through the history of used commands.
When you use the terminal on a daily basis, your command history will likely be a long list of many different commands, thus causing navigation less easy.
Just as an example, let's say that a month ago I used the iwconfig
with a determined set of parameters (like I said, it's just an example, I don't need to mess with it right now), how can I recall that particular command with all its arguments and parameters without having to navigate back through hundreds of history commands?
I know that I could use history
to have a list of previously used commands and !n
to re-execute the n command on the said list, but when the history grows large, it is not very practical too.
The ideal thing would be to have something that will let me use some hotkey to navigate through history but just between the instances that contain what I have already typed on the command line; so in my example, after having typed iwconfig
, use some keys (maybe PgUp and PgDown?) to navigate just through the entries that begins with iwconfig.
If it is not possible, it would also be nice to print a list like history
do but that will only contain what I've already typed (I suspect that history
and grep
command are involved but I'm not sure about the correct syntax); but the previous hotkey solution would be the best option.