Created
June 13, 2017 07:23
-
-
Save znck/6e94dbb127db2609d60206b4ec56821e to your computer and use it in GitHub Desktop.
Create an alias for last command.
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
function aliasthat { | |
if [ -n ${1} ]; then | |
fc -e "sed -i -e \"s/^.*/echo alias $1=\\\"'\\\"\'&\'\\\"'\\\" >> ~\/.bash_alias/\"" | |
. ~/.bash_alias | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment