Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_alias is a function
- add_alias ()
- {
- if [ $# -lt 2 ]; then
- printf '\nUSAGE:#=> \t add_alias mynewalias "some very long command"\n';
- else
- local name="$1" value="$2";
- echo alias "$name"=\'$value\' >> ~/bash.bash_aliases;
- eval alias "$name"=\'$value\';
- alias "$name";
- fi
- }
Add Comment
Please, Sign In to add comment