Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> And you can't really, say, put it in both your `.zprofile` and `.zshrc` or `.bash_profile`, `.profile`, and `.bashrc`, because then it'll get executed more than once and you'd need to maintain some kind of state to prevent that.

FWIW, profiles are loaded on 'from scratch' logins; RC files are loaded all the time.

* https://superuser.com/questions/657848/why-do-we-have-login-...

* https://askubuntu.com/questions/879364/differentiate-interac...



> RC files are loaded all the time

Not necessarily. Bash won't do it on its own for a login shell, but there's probably a bit in the /etc/profile your distro provides that does it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: