Post History
Are you familiar with the Bash history shortcuts? The most basic is !! to refer to the last command you entered. This lets you do things like sudo !! to run the last command with privileges. You co...
Answer
#1: Initial revision
Are you familiar with the Bash history shortcuts? The most basic is `!!` to refer to the last command you entered. This lets you do things like `sudo !!` to run the last command with privileges. You could use that or the "search" one (last command containing substring: `!?`) to echo it to your alias file. ```sh echo '!?()' >> ~/.bash_aliases ```