• SlurpingPus@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    45 minutes ago

    Functions are definitely not subshells in Bash, seeing as anything modifying the environment, like pyenv and such, is implemented as functions instead of scripts — specifically because functions are run in the same shell instance.

    Unless ‘subshell’ means something in the vein of ‘like a new shell, but not really’.