| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
If process group leader exits, allow a newly forked process to become
process leader. If a foreground job, reattach the shell to the
terminal until that happens.
Unblock signals when reading output for command subsitution so that
we can do this reattaching immediately.
|
|
|
|
|
| |
This was occurring in a multiple function definition where a
function name is duplicated.
|
| |
|
| |
|
|
|
|
| |
This improves the consistency of error reporting from $(...) constructs.
|
|
|
|
|
| |
Handling of white space in particular was confusing and inconsistent
with other shells.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
"[n] No" to the RM_STAR_SILENT prompt.
Patch by Stephane, rebased by Mikael.
|
|
|
|
|
|
| |
Needed when comparing word code function name with autoload request.
Add test.
|
|
|
|
|
|
| |
Replaces stack for more efficient memory management.
Also fix debug message when FUNCNEST is increased.
|
|
|
|
| |
Initialised from existing configuration value.
|
|
|
|
|
|
| |
We try to move an fd which isn't opend but it will feel.
This needs handling specially in the new code for marking
saved fd's.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
There was an exception to the usual ERR_EXIT pattern that causes
problems when executing a function in an else branch. It seems
the exception is no longer needed as the regression tests pass
without it.
|
|
|
|
|
|
|
|
| |
It now operates separately at each function depth.
To keep ERR_EXIT global, make the noerrexit variable usd bit flags.
Extend tests.
|
|
|
|
|
| |
Record fd's that have been saved in fdtable and if the shell
forks close them as they will never be restored.
|
|
|
|
| |
Document the default behaviour and add a test.
|
|
|
|
| |
Heap is usable ever since addfilelist() of workers/31528 (commit 3c573222).
|
|
|
|
| |
This was missing in the case of &,, causing a file descriptor leak.
|
|
|
|
| |
Also add tests for known precommand modifier issues.
|
|
|
|
|
|
| |
Also add check so we don't delay an exit if we were already in
an EXIT trap for the main shell, as we should in that case leave
immediately.
|
| |
|
|
|
|
|
|
|
| |
This was turned off explicitly as it was assumed not to be needed,
but it is when code in a sourced file is suspended.
We'll need to see if this makes start up inefficient.
|
|
|
|
|
|
| |
If typeset family builtins are recognised as keywords then the value
is handled as a separate expansion and we don't need the old
magic behaviour, even if the option is set.
|
|
|
|
|
|
| |
This fixes use of pattern match character ranges in unusual contexts.
Attempt to detect a tokenized - in cases where we don't care.
|
|
|
|
| |
This patch overloads the zsh_subshell counter which is meant for $ZSH_SUBSHELL, but no one has suggested a working alternate test.
|
|
|
|
|
|
| |
trap handling
Also small improvement to loop that resets trap handlers
|
|
|
|
|
| |
These are companions to WARN_CREATED_GLOBAL, warning when a variable
from an enclosing scope is altered.
|
|
|
|
|
|
| |
Now used for all autoloaded functions after load, including those
where the file was found along fpath, reducing duplication of
directory names.
|
|
|
|
|
| |
This renders "autoload /blah/blah/*" as efficient as use of
fpath.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
When updating shfunc structure to change filename we should be
careful to free whatever's there already, we may now be the
directory in which to find the function definition. After loading
the field contains the full name of the file.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Don't trigger just because status is non-zero at end of
current shell group.
|
|
|
|
|
|
| |
Don't trigger just because status is non-zero at end of
complex shell construct as this may be a case we've already
suppressed.
|
|
|
|
|
| |
This ensures we've got enough space for a null, although this
isn't always needed.
|
|
|
|
|
|
| |
'../'.
While here, add some docstrings.
|
|
|
|
|
| |
There is a special case if the LHS is a shell construct.
Add unit tests for both cases.
|
|
|
|
|
| |
"foo && bar" inside a function could cause the code outside
the function not to perform ERR_EXIT or ERR_RETURN when needed.
|
| |
|
|
|
|
|
|
|
| |
Don't behave as if command not found if return status is non-zero
as this may simply be the return status of the replacement command.
Let the function report a command not found instead.
|
|
|
|
| |
All of these are added simply to fit existing logic in other branches.
|
|
|
|
|
|
| |
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.
|
| |
|