Created
May 23, 2016 20:51
-
-
Save levmichael3/68485e9624d9a861cd976dd6cf753ccb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new-alias() { | |
local last_command=$(echo `history |tail -n2 |head -n1` | sed 's/[0-9]* //') | |
echo alias $1="'""$last_command""'" >> ~/.bash_profile | |
. ~/.bash_profile | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment