-
-
Save pi0/5d364b5d1e044be85fe55adc12dd2231 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