Created
July 24, 2012 18:15
-
-
Save pspeter3/3171607 to your computer and use it in GitHub Desktop.
Quickly add aliases to your ~/.bashrc
This file contains 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 add-alias() { | |
echo "alias $1=\"${@:2:$#}\"" >> ~/.bashrc; | |
source ~/.bashrc; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
An example would be
add-alias list-all ls -a
which becomes
alias list-all="ls -a"