apatel762 / home-infra

A repository containing all of the setup for my home infra (e.g. my laptop & soon, my server)
GNU Affero General Public License v3.0
0 stars 0 forks source link

Put `.bashrc.d/` snippet into `.bashrc` via Ansible #56

Closed apatel762 closed 2 years ago

apatel762 commented 2 years ago

This is the expected snippet:

# User specific aliases and functions
if [ -d ~/.bashrc.d ]; then
    for rc in ~/.bashrc.d/*; do
        if [ -f "$rc" ]; then
            . "$rc"
        fi
    done
fi

unset rc

It's already in the Fedora /etc/skel/.bashrc file but would be good to ensure that it is there so that the custom dotfiles will automatically be picked up when they're installed.

apatel762 commented 2 years ago

also put something around it that stops it from executing when you're in a non-interactive session

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac
apatel762 commented 2 years ago

Didn't do it with Ansible in the end, easier to just add the bashrc to my dotfiles