I’m introducing Bash’s !$ which can reuse arguments and is quite convenient.
A typical example would be doing cd after mkdir.
It can also be used for things like doing docker rm after docker kill… or maybe not.
$ mkdir -p hoge/fuga
$ cd !$
cd hoge/fuga
/hoge/fuga$ echo !$
echo hoge/fuga
hoge/fuga
# If there are 2 or more arguments, it will be the last one
/hoge/fuga$ mkdir -p hgoe/fuga foo/bar/baz
/hoge/fuga$ echo !$
echo foo/bar/baz
foo/bar/baz