@b0rk_reruns ooooo these are super useful!
Another bash history shortcut I use all the time is !:s/PATTERN/SUBSTITUTION/
, which lets you do sed-style regex substitutions on your last run command. You can also use ^PATTERN^SUBSTITUTION
as a shorthand, or add the first few characters of the command you're looking for after the ! if you want to search for the most recent use of a specific command (i.e. !cat:s/PATTERN/SUB/
)
There are a whole bunch of useful history shortcuts I didn't know existed until recently; definitely recommend looking up an exhaustive list if you're curious. This is the first time I've seen the ctrl+r one though, definitely gonna be using that frequently