My question is very similar to that of this old post.
I would like to do something similar: place in an alias the last argument(s) typed on the current command line. This would be equivalent to the
csh \!* which can be used in aliases.
According to the referenced post, it sounds as though the issue is the history expansion of bash, which is why fc is used instead. The idea would be to have the substitution work in the middle of a string of commands, such as
alias cat='cat -n !!:* && echo ""' (as a simplified example, which doesn't work because of the expansion issue).
However, this differs from the referenced post in the sense that I want to grab only the arguments beyond the first command (i.e. in the post, they grab the entire line, rather than the entire line except for the zero-th argument, the command itself).
What is the best way to do this in a bash alias? (Note: looking to keep this as an alias, not looking for a script or function).