22 lines
697 B
Plaintext
22 lines
697 B
Plaintext
# The Contents of this file will be directly related to the functioning of the alias files
|
|
|
|
# Variable for the cloned directory for these aliases
|
|
bash_aliases="/etc/bash_aliases"
|
|
|
|
# Pull aliases from git repo
|
|
alias alias-pull='git -C $bash_aliases pull --quiet && echo "Pulled $bash_aliases"'
|
|
|
|
# Reload bashrc which then sources this file
|
|
alias alias-reload='source ~/.bashrc && echo "Reloaded ~/.bashrc"'
|
|
|
|
# Run the alias Pull and Reload commands together
|
|
alias alias-update='alias-pull && alias-reload'
|
|
|
|
# Import alias files in this the cloned directory
|
|
for alias_file in "$bash_aliases"/*.aliases
|
|
do
|
|
if [ $alias_file != "$bash_aliases/main.aliases" ]; then
|
|
source $alias_file
|
|
fi
|
|
done
|