652
functions (lemmy.nz)

cross-posted from: https://lemmy.ml/post/39334581

you are viewing a single comment's thread
view the rest of the comments
[-] Lifter@discuss.tchncs.de 1 points 11 months ago

Try doing cd inside a function and then pwd in the main script. Does it move the main script too?

[-] SlurpingPus@lemmy.world 1 points 11 months ago* (last edited 11 months ago)

I'm gonna bet yes for the simple reason that various helper scripts exist that do advanced cd history, with fuzzy search and whatnot, and they can't be implemented as anything other than functions.

this post was submitted on 22 Nov 2025
652 points (98.7% liked)

Programmer Humor

34016 readers
1544 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 3 years ago
MODERATORS