I am trying to get the same functionality as on a Linux where the last argument can be inserted into a another command easily.
If you're using
zsh, the shortcut
!$ works in the same fashion.
[user@localhost ~]$ echo "test" >> new_file [user@localhost ~]$ cat !$ cat new_file test