For example, I edit and then run the same source.
vim arbit.py python arbit.py
I know I could run it from within
vim, but I want a general solution on Bash. I keep finding situations where I reuse arguments.
How can I do that?
You can combine it with all the features of
Or, if you want only the last word, there are two other ways:
See the bash history interaction documentation for more details.
There are at least a couple of ways to do this.
which retrieves the last argument of the previous command as does:
which retrieves all the arguments of the previous command.