Open znicholls opened 6 years ago
Probably belongs in software-tips-and-tricks --> terminals --> bash --> bash.md
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
~/.bashrc
if [ -s ~/.bashrc ]; then source ~/.bashrc; fi
in ~/.bash_profile.
~/.bash_profile
Made a branch for this: https://github.com/znicholls/clean-code/tree/bash-notes
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 putin
~/.bash_profile
.