this post was submitted on 18 Jul 2024
271 points (98.6% liked)

Programmer Humor

19187 readers
1198 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
271
Which one??? (programming.dev)
submitted 2 months ago* (last edited 2 months ago) by [email protected] to c/[email protected]
 

Fuck it, .zshrc it is.

Image transcription:

  • Top text: I STILL DON'T KNOW WHAT SHOULD GO IN .*RC VERSUS .*PROFILE
  • Bottom text: AND AT THIS POINT I'M AFRAID TO ASK
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 10 points 2 months ago (1 children)

So, assuming bash is your shell, the ~/.bash_profile is executed for login shells for the user logging in.

~/.bashrc is the initialization script for when starting a bash session (for the current user).

In my experience, the ~/.bashrc will also execute ~/.bash_profile if it exists. So you can use either.

[โ€“] [email protected] 1 points 2 months ago

What would I want in login environments I wouldn't also want in interactive ones though?