Tip #1: yank last arg
command line trick that saves some typing
Yank last argument is a command-line feature that I have been utilizing for some time. It allows you to quickly paste the last argument entered on the command line. This feature is available in most modern shells and can be accessed using the following
keyboard shortcut.
ALT
+.
An example of how to use the yank last argument feature is as follows: if you run ping 1.1.1.1
and then want to run a traceroute
to the same IP, simply type tracerroute
and then hit ALT + .
. This will automatically complete the command with the argument you used in the previous command, resulting in traceroute 1.1.1.1
for you to run.
This post is licensed under CC BY 4.0 by the author.