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

you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 9 months ago (1 child)

Turns out you can, by using () instead of {} in the function declaration you can run the function in a subshell where changes to variables are scoped to the subshell and functions are local.

  • source
  • parent
  • hideshow 2 child comments