Created
October 5, 2013 13:07
-
-
Save devinhalladay/6840758 to your computer and use it in GitHub Desktop.
A function for creating permanent aliases.
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
# To use: | |
# $ aalias "foo" "bar" | |
# Puts "alias foo='bar'" in your .aliases file | |
function aalias() { | |
# Add new line before alias | |
echo "" >> ~/.aliases && source ~/.aliases | |
# Add alias to .aliases | |
echo "alias $1='$2'" >> ~/.aliases && source ~/.aliases; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment