Created
February 8, 2013 09:43
-
-
Save klebervirgilio/4737739 to your computer and use it in GitHub Desktop.
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 add_alias { | |
echo "alias $1=\"$2\"" >> ~/.aliases | |
echo 'Reloading...' | |
sz | |
} | |
function show_my_aliases { | |
echo $my_aliases | sort | grep -e "^$" -v | |
} | |
export my_aliases='' | |
for file in ~/.aliases ~/.aliases1 ... ./aliasesN | |
do; | |
if [ -f $file ]; then | |
source $file | |
local buff='' | |
while read line | |
do; | |
buff=$buff"\n$(echo $line | replace '=' ': ')" | |
done < <(replace 'alias ' '' < $file) | |
export my_aliases=$my_aliases$buff | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment