How to search all matching previous commands using ctrl+R in Linux
Not sure if you can do this using Ctrl+R, but you can leverage history
command and achieve similar result:
man history:NAME history - GNU History Library
Add a function to your ~/.bashrc
that checks a history.
For example:
h() { history | grep "$1" | grep "$2" | grep "$3" | head -10 | sed 's/[^ ]* //'; }
Then you would need to copy and paste the result. ( You may also need to adjust sed
command to strip out number and spaces more accuratly)