I automate my environment across multiple workstations using Ansible. Part of this automation requires editing ~/.bashrc. Editing ~/.bashrc is often messy as the file doesn't have a strict structure. Long customization blocks often require care when parsed by automation tools. Suggestion: Follow the pattern used by other projects and allow for customizations to live in their own file in a specified directory: i.e. ~/.bashrc.d. The file /etc/profile already takes a similar approach. The following could be added to the default ~/.bashrc to make this work: # Avoid editing ~/.bashrc directly. Instead add files in ~/.bashrc.d/*.sh to # make custom changes to your environment. for f in $(compgen -G "${HOME}/.bashrc.d/*.sh"); do . "${f}" done Here is an article that describes this approach: https://medium.com/@waxzce/use-bashrc-d-directory-instead-of-bloated-bashrc-50204d5389ff
Is this a duplicate of bug #1726397 ?
Yup! Thanks for finding that. I missed it during my searching. *** This bug has been marked as a duplicate of bug 1726397 ***