Expand description
Which shell variables a command has certainly set to a literal (#1953, #2079).
The write guards follow a command the way the shell would, but only as far
as the text alone allows. A variable is known when this same command set it
to a literal earlier, in a way that certainly took effect in the current
shell, or when it is $TMPDIR — the scratch variable the guards themselves
name as an allowed destination — and the command has not rebound it. Every
other variable stays unknown, and an unknown variable leaves whatever
depends on it unresolved.
Structs§
- Known
Vars - The variables known to hold a value when one segment starts.
Functions§
- expand_
leading_ variable - Expand a target that starts with
$NAMEor${NAME}fromknown— which includes$TMPDIRfrom the environment unless the command rebound it.Nonewhen the target starts with no variable or an unknown one. - literal_
assignments_ before_ each_ segment - For each segment, the variables known to hold a literal value when that segment starts (#1953).