update for loop on zshrc and bashrc for aliases

This commit is contained in:
doman 2023-07-22 14:53:26 +02:00
parent 124b2851f0
commit 6f870bc246
2 changed files with 23 additions and 4 deletions

16
.bashrc
View file

@ -46,6 +46,18 @@ ex ()
# exports
export PATH="$HOME/.local/bin:$HOME/.bin:$PATH"
# run neofetch!
neofetch 2>/dev/null
. "$HOME/.cargo/env"
if [ -d "$HOME/.config/aliasrc" ]; then
for ALIASFILE in $HOME/.config/aliasrc/*; do
source $ALIASFILE
done
fi
# Load scripts
if [ -d "$HOME/.config/scriptrc" ]; then
for SCRIPTFILE in $HOME/.config/scriptrc/*; do
source $SCRIPTFILE
done
fi

11
.zshrc
View file

@ -181,8 +181,15 @@ bindkey '\eOF' end-of-line
# Load aliases and shortcuts if existent.
if [ -d "$HOME/.config/aliasrc" ]; then
for ALIASFILE in $(ls $HOME/.config/aliasrc); do
source "$HOME/.config/aliasrc/$ALIASFILE"
for ALIASFILE in $HOME/.config/aliasrc/*; do
source $ALIASFILE
done
fi
# Load scripts
if [ -d "$HOME/.config/scriptrc" ]; then
for SCRIPTFILE in $HOME/.config/scriptrc/*; do
source $SCRIPTFILE
done
fi