unverified
5y, 163d ago
In Bash, you can use M-. (Option-period) to add the last argument of the previous command to the current command line.
!$ does the same thing.
$ mkdir /path/to/new/dir
$ cd !$
unverified
5y, 103d ago
Pressing opt-. multiple times goes back through the history though.