Cipherd@lemmy.ml to Programmer Humor@programming.dev · 2 days agofunctionslemmy.mlimagemessage-square119linkfedilinkarrow-up1648arrow-down19file-textcross-posted to: programmerhumor@lemmy.ml
arrow-up1639arrow-down1imagefunctionslemmy.mlCipherd@lemmy.ml to Programmer Humor@programming.dev · 2 days agomessage-square119linkfedilinkfile-textcross-posted to: programmerhumor@lemmy.ml
minus-squareLifter@discuss.tchncs.delinkfedilinkarrow-up1·2 days agoTry doing cd inside a function and then pwd in the main script. Does it move the main script too?
minus-squareSlurpingPus@lemmy.worldlinkfedilinkarrow-up1·edit-21 day agoI’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.
Try doing
cdinside a function and thenpwdin the main script. Does it move the main script too?I’m gonna bet yes for the simple reason that various helper scripts exist that do advanced
cdhistory, with fuzzy search and whatnot, and they can’t be implemented as anything other than functions.