(osx version) when copied to ~/.bashrc or ~/.bash_profile, will create 'Ctrl + ]' keyboard shortcut, allowing *current* (not necessarily last) terminal command to be copied to the gui clipboard via pbpaste.