Now
MAIN commitmail json YAML
src/bin/sh/builtins.def@1.26
/
diff
/
nxr@1.26
src/bin/sh/sh.1@1.220 / diff / nxr@1.220
src/bin/sh/var.c@1.78 / diff / nxr@1.78
src/bin/sh/sh.1@1.220 / diff / nxr@1.220
src/bin/sh/var.c@1.78 / diff / nxr@1.78
Add the "specialvar" built-in command. Discussed (well, mentioned
anway) on tech-userlevel with no adverse response.
This allows the magic of vars like HOSTNAME SECONDS, ToD (etc) to be
restored should it be lost - perhaps by having a var of the same name
imported from the environment (which needs to remove the magic in case
a set of scripts are using the env to pass data, and the var name chosen
happens to be one of our magic ones).
No change to SMALL shells (or smaller) - none of the magic vars (except
LINENO, which is exempt from all of this) exist in those, hence such a
shell has no need for this command either.
anway) on tech-userlevel with no adverse response.
This allows the magic of vars like HOSTNAME SECONDS, ToD (etc) to be
restored should it be lost - perhaps by having a var of the same name
imported from the environment (which needs to remove the magic in case
a set of scripts are using the env to pass data, and the var name chosen
happens to be one of our magic ones).
No change to SMALL shells (or smaller) - none of the magic vars (except
LINENO, which is exempt from all of this) exist in those, hence such a
shell has no need for this command either.