Functions defined inside other fucntions needs file line number
adding. Particularly useful for anonymous fucntions.
Add flag to indicate a function is anonymous. Done up to now
by comparing the name to a pointer but this is more consistent.
Move detection of key/value pairs down into prefork().
Detect normal array assignment and [key]=val array assignemnt
separately. Mark key / value pairs with Marker and pass up flag. Deal
with marked triads specially later on.
Works for both normal and typeset case, also var+=...
Still to do: allow to be mixed with straight array assignment,
improve typeset -p, implement [key]+=value.
This sets the shell emulation mode similarly to ARGV0=... which
doesn't work from other shells.
Note that this gives more comprehensive emulation than running
emulate within the shell.
This is a job forked from the current shell when a job partly
running from the current shell was suspended. When all associated
processes started from the main shell are finished the job is
continued and at this point the disown can complete.
This replaces 41113 / 94014ff65b with a simple local change for the
immediate problem. It's not entirely clear if this reflects wider
changes in the structure of the history code.
When saving history state save whether the current history line
is linked into the ring and remove it, and restore as appropriate
later. This avoids surprises where the history ring is freed
and incorrectly frees the current state in curline, which has
a different allocation strategy.
Original patch tweaked to make restoring more logical.
If doing "autoload -X", the path present might actually be location
of file containing the function with the autoload -X. Add
an explicit flag to say it's a directory for autoload.
path.
-d defaults to normal fpath
-r remembers the path without actually loading. May be combined with -d.
-R does the same but it's an error if not found
-X can now take a directory path: this is used to output not yet loaded
functions that have an associated path.
By splitting into _analyse and _exec execpline2() has easier
access to the state at the start of execution. Use this
to ensure we fork if this is a builtin with no arguments.
This flags that compstate (or any other special) can only have
a single instance and an attempt to create a new one is an error.
Given the very fiddly semantics of compstate any other usage
seems pointless.
No investigation yet of other variables that could use this.
Note it's still possible to hide such variables; only instances
that keep the special nature are affected.
Enhance WARNCREATEGLOBAL to work in many more cases.
Don't create REPLY as an integer if it didn't previously exist
as one, even if the value to be set is integral, as this is likely to
mess up later uses of REPLY.