boundedinfinity / userdotd

1 stars 0 forks source link

implement bash_profile login hooks #10

Open boundedinfinity opened 5 years ago

boundedinfinity commented 5 years ago

Using something like (not fully tested):

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

# User specific environment and startup programs

for i in {{ usershelld_home }}/bash/bash_profile.d/enabled/*.bash ; do
    if [ -r "$i" ]; then
        if [ "${-#*i}" != "$-" ]; then
            source "$i"
        else
            source "$i" >/dev/null
        fi
    fi
done