Cool idea. For those systems where you don't have the option of adding a 3rd party tool, it's probably worth knowing some of the standard bash shortcuts. The easy to remember ones are: !^ - the first argument from the previous command !$ - the last argument from the previous command !* - all of the arguments from the previous command !! - the entire previous command For example: $ apt-get install foo # Crap $ sudo !!
atom path/to/so[tab]/fi[tab] [return] git diff $_
Complete reference: https://www.gnu.org/software/bash/manual/html_node/Variable-...