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

Programmer Humor

19570 readers
1413 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
272
Which one??? (programming.dev)
submitted 4 months ago* (last edited 4 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] 73 points 4 months ago (11 children)

I found this diagram on SO at one point but I can’t find the post and it is the best explanation I have found for how all of the files work for bash and zsh, each color is an individual path of execution (eg, follow the red line).

Bottom line though, it only really matters if you are overriding something that is already defined, for example I tell my users to use zshrc and I provide defaults and common things in zprofile because zshrc is executed last when they login.

[–] [email protected] 50 points 4 months ago (3 children)

I feel like I couldn't make this more confusing if I tried. What is doing on with the golden arrows around /etc/profile??

[–] [email protected] 35 points 4 months ago (1 children)

That's decades of legacy for you...

I bet each step/arrow/decision had a good reason at some point, but most of them probably back when computers lived in caves and hunted their tapes using spears and rocks.

I feel like we're slowly reaching a point where the complexity is collapsing in on itself - just look at the absolute chaos a modern web app is.

[–] [email protected] 3 points 4 months ago

I was referring more to the graphical representation that the actual flows.

load more comments (1 replies)
load more comments (8 replies)