I frequently search for changes with
history | grep 'string'
I get a list of commands in my history, along with the history line number), e.g.
history | grep 'git' 755 git status 1535 git push origin master 1570 git merge origin/one-146 1667 git reset --hard origin/master
I can now recall and execute a command in one go with
!nnn, for example:
!755 git status # On branch master nothing to commit, working directory clean
My question is: How can I recall a numbered history command and stay on the commands line for editing and not execute it right away 'as is', the way that
! does, so that I can change a couple of things peform presing return?