home ~ socials ~ projects ~ rss

Run A Command With The Arguments Of The Previous Command

June 2021

This will get you the arguments from the previous command:

!*

You can use it to run a command with the same arguments. For example, if you mess up a command:

mdir ~/path/to/some/dir/to/make

mkdir !*
end of line
Share link:
https://www.alanwsmith.com/en/20/eo/ay/5h/?run-a-command-with-the-arguments-of-the-previous-command