I was wondering if there is a way to repeat a bash command with a subcommand separated by space. For example, if I enter several commands,
git add a.txt
git status
... other commands starting with git
git commit -m ""
and do:
!git
I will run the last git commit
command again. My questions, is there a way to repeat the last command that contains a space, e.g. to repeat the last git status
command?
I tried,
!git\ s
!"git s"
, but none works.