Cipherd@lemmy.ml to Programmer Humor@programming.dev · 10 个月前functionslemmy.mlimagemessage-square119linkfedilinkarrow-up1666arrow-down19file-text
arrow-up1657arrow-down1imagefunctionslemmy.mlCipherd@lemmy.ml to Programmer Humor@programming.dev · 10 个月前message-square119linkfedilinkfile-text
minus-squareLifter@discuss.tchncs.delinkfedilinkarrow-up1·10 个月前Try doing cd inside a function and then pwd in the main script. Does it move the main script too?
minus-squarepet the cat, walk the dog@lemmy.worldlinkfedilinkarrow-up1·edit-210 个月前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.
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.