codingyarns / clean-code

A repository for sharing stories, tales and yarns about how to write clean code
https://clean-code.readthedocs.io/en/latest/
Creative Commons Zero v1.0 Universal
0 stars 0 forks source link

Add overview of `bashrc` and `bash_profile` #4

Open znicholls opened 6 years ago

znicholls commented 6 years ago

Probably belongs in software-tips-and-tricks --> terminals --> bash --> bash.md

Notes I have so far

This explains how things are a bit weird on a mac: [https://apple.stackexchange.com/questions/12993/why-doesnt-bashrc-run-automatically?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa]()

Basically, bash does not use ~/.bashrc for login shells, only for non-interactive shells. Hence why it's standard advice to put

if [ -s ~/.bashrc ]; then
    source ~/.bashrc;
fi

in ~/.bash_profile.

znicholls commented 6 years ago

Made a branch for this: https://github.com/znicholls/clean-code/tree/bash-notes