Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Spivak
on Oct 24, 2020
|
parent
|
context
|
favorite
| on:
/.bashrc VS –/.profile VS –/.bash_profile
Why not just guard your .bash_profile with something like
if shopt -q login_shell; then ...
and then just pretend it’s the Linux-y way?
LeoPanthera
on Oct 24, 2020
[–]
My solution is that bash_profile simply runs bashrc, and bashrc starts with:
if [ -n "$PS1" ]; then
That seems to work fine everywhere.
matheusmoreira
on Oct 24, 2020
|
parent
[–]
I agree, this is a much better solution. Multiple shell configuration files should be deprecated and replaced with this.
Join us for
AI Startup School
this June 16-17 in San Francisco!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: