I was wondering if its possible to execute commands from history that match a certain regex? I know you can do something likefc 232 248And it will go into your history and then do revisions 232-248 consecutively.However, if some of the commands in between are things I do not want to do, is there a way I can specify that? Right now I look up my history and pipe it out to a grephistory | grep checkoutSo this will look up all terminal actions I've done with checkout I have done. 232 git checkout master files/file1.txt234 git checkout master files/file2.txt248 git checkout master files/file3.txtIt filters out some of the numbers so I only want to execute the ones that have been piped out. rather than everything in between
Execute commands from history that match regex or grep
bash;grep;command history