3
0

env_and_func.tests 298 B

12345678
  1. var=old
  2. f() { echo "var=$var"; }
  3. # bash: POSIXLY_CORRECT behavior is to "leak" new variable values
  4. # out of function invocations (similar to "special builtins" behavior);
  5. # but in "bash mode", they don't leak.
  6. # hush does not "leak" values. ash used to, but now does not.
  7. var=val f
  8. echo "var=$var"