Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | 40391: Add WARN_NESTED_VAR option and functions -W. | Peter Stephenson | 2017-01-23 | 1 | -3/+10 |
| | | | | | These are companions to WARN_CREATED_GLOBAL, warning when a variable from an enclosing scope is altered. | ||||
* | 40353 with tweaks to whence -v: extend directory cache use. | Peter Stephenson | 2017-01-16 | 1 | -26/+56 |
| | | | | | | Now used for all autoloaded functions after load, including those where the file was found along fpath, reducing duplication of directory names. | ||||
* | 40342: Add directory name cache for autoload file paths. | Peter Stephenson | 2017-01-12 | 1 | -5/+10 |
| | | | | | This renders "autoload /blah/blah/*" as efficient as use of fpath. | ||||
* | 40335: More care with autoload function path. | Peter Stephenson | 2017-01-12 | 1 | -3/+4 |
| | | | | | | 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. | ||||
* | unposted: more care with shell function filename. | Peter Stephenson | 2017-01-11 | 1 | -0/+2 |
| | | | | | | | 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. | ||||
* | Add features associated with autoloading a function using an absolute | Peter Stephenson | 2017-01-11 | 1 | -11/+33 |
| | | | | | | | | | | | | | 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. | ||||
* | Additional case for ERR_RETURN and ERR_EXIT. | Peter Stephenson | 2016-12-05 | 1 | -0/+1 |
| | | | | | Don't trigger just because status is non-zero at end of current shell group. | ||||
* | Extra case for ERR_RETURN and ERR_EXIT. | Peter Stephenson | 2016-12-05 | 1 | -1/+9 |
| | | | | | | 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. | ||||
* | 39958: Add extra byte to PATH_MAX allocations. | Peter Stephenson | 2016-11-17 | 1 | -8/+8 |
| | | | | | This ensures we've got enough space for a null, although this isn't always needed. | ||||
* | 39915: whence: Honor PATH_DIRS option for arguments that start with './' or ↵ | Daniel Shahaf | 2016-11-17 | 1 | -7/+16 |
| | | | | | | '../'. While here, add some docstrings. | ||||
* | 39901: No EXIT trap on LHS of pipeline. | Peter Stephenson | 2016-11-10 | 1 | -0/+4 |
| | | | | | There is a special case if the LHS is a shell construct. Add unit tests for both cases. | ||||
* | 39571: Fix ERR_EXIT bug with && and function. | Peter Stephenson | 2016-10-05 | 1 | -6/+6 |
| | | | | | "foo && bar" inside a function could cause the code outside the function not to perform ERR_EXIT or ERR_RETURN when needed. | ||||
* | 39568: "! <complex-command>" suppresses ERR_EXIT | Peter Stephenson | 2016-10-05 | 1 | -2/+7 |
| | |||||
* | 39566: Improve usefulness of command_not_found_handler. | Peter Stephenson | 2016-10-05 | 1 | -5/+8 |
| | | | | | | | 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. | ||||
* | 39545: Add some missing unqueue_signals(). | Peter Stephenson | 2016-10-03 | 1 | -0/+3 |
| | | | | All of these are added simply to fit existing logic in other branches. | ||||
* | 39521: Refactor start of execcmd(). | Peter Stephenson | 2016-10-03 | 1 | -46/+81 |
| | | | | | | 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. | ||||
* | 39540: "! command" should suppress ERR_EXIT and ERR_RETURN | Peter Stephenson | 2016-10-02 | 1 | -2/+6 |
| | |||||
* | 39517: back off 39502 (WC_ASSIGN causes fork in pipe). | Peter Stephenson | 2016-09-30 | 1 | -1/+1 |
| | | | | This isn't a robust fix as WC_ASSIGNs simply precede the main wordcode. | ||||
* | 39507: TMPSUFFIX for =(...) | Barton E. Schaefer | 2016-09-29 | 1 | -0/+9 |
| | |||||
* | 39470: failure to open a supposedly unique temp file name should result in ↵ | Barton E. Schaefer | 2016-09-29 | 1 | -5/+11 |
| | | | | | | an error Also band-aid for signal-related race conditions in temp file name generation | ||||
* | 39502: Fork for assignment in LHS of pipeline. | Peter Stephenson | 2016-09-29 | 1 | -1/+2 |
| | | | | | | | foo=bar | stuff left the value of foo set to bar as we didn't realise we needed to fork. | ||||
* | 34943: Fixes for "command" with multiple options. | Peter Stephenson | 2016-09-29 | 1 | -37/+116 |
| | | | | | | These need to combine properly, and alos "command -p" with either -v or -V needs to search for builtins and then using the default system path. | ||||
* | 39437: use list_pipe_pid in assignment for clarity | Barton E. Schaefer | 2016-09-27 | 1 | -1/+1 |
| | |||||
* | 39436: Pass on status of SIGINT better. | Peter Stephenson | 2016-09-25 | 1 | -1/+2 |
| | | | | | | Set lastval to 128 + SIGINT on interrupt. Don't execute builtin if already interrupted at that point. | ||||
* | 39435: Further fix for pgrp of funny pipelines. | Peter Stephenson | 2016-09-25 | 1 | -1/+2 |
| | | | | | Don't set gleader of SUBJOB at the point of creation if the SUPERJOB has no processes yet. | ||||
* | 39381: handle save/restore of variable values when "typeset"-related ↵ | Barton E. Schaefer | 2016-09-19 | 1 | -2/+2 |
| | | | | reserved words are prefixed by an assignment | ||||
* | 39362: another race with pipeline handling. | Peter Stephenson | 2016-09-16 | 1 | -25/+9 |
| | | | | | | When forking the shell to control the right hand side, the forked subshell now always starts its own process group, to avoid getting a spurious additional SIGSTOP. | ||||
* | 39359: Fix remaining race with orphaned subjob. | Peter Stephenson | 2016-09-16 | 1 | -1/+43 |
| | | | | | | When shell is forked to run right hand side of pipieline it should use its own PID as process group if the left hand side of the pipeline has already exited. | ||||
* | 39331: Reparent subjob on fork with exited superjob. | Peter Stephenson | 2016-09-16 | 1 | -1/+18 |
| | | | | | | | | | | | Fixes case of v() { { vim - } always { true } } ls | v ^Z fg Tentative fix: still a race at exit where zsh forked by ^Z is stopped when restarted. | ||||
* | 39305: Fix error handling after parse for here document. | Peter Stephenson | 2016-09-13 | 1 | -1/+1 |
| | | | | | Keep the error status the same as before, but also retain the interrupt status if that was non-zero. | ||||
* | 39125: More care needed decrementing SHLVL on exec. | Stephane Chazelas | 2016-08-31 | 1 | -4/+7 |
| | | | | Not needed in subshell. | ||||
* | 39104: do not hash relative paths in findcmd() | Barton E. Schaefer | 2016-08-26 | 1 | -1/+1 |
| | |||||
* | 38991: Make 'whence -v autoloaded-function' shows the defining filename. | Daniel Shahaf | 2016-08-05 | 1 | -1/+2 |
| | | | | | | This may also fix a problem whereby the %x prompt escape evaluated to a function name rather than a filename, since %x is also backed by scriptfilename. | ||||
* | 38653 + 38657: 'functions -T' tracing: recurse into anonymous functions. | Daniel Shahaf | 2016-06-13 | 1 | -3/+9 |
| | |||||
* | 38350 (cf. Glenn Smith: 38348): Remove-all warning should warn about the ↵ | Barton E. Schaefer | 2016-04-26 | 1 | -2/+2 |
| | | | | root directory as well | ||||
* | 38114: Fix hang using ^Z with command subst. | Peter Stephenson | 2016-03-09 | 1 | -2/+11 |
| | | | | | In subshells started to perform substitutions disable signals that require interactive handling. | ||||
* | 37868: add 'static' to file local variables | Jun-ichi Takimoto | 2016-02-03 | 1 | -2/+0 |
| | |||||
* | 37473: check for cshnullglob in command position. | Barton E. Schaefer | 2016-01-01 | 1 | -0/+5 |
| | |||||
* | 37435 (+ fix typo): allow execution of empty files as "sh" scripts | Barton E. Schaefer | 2015-12-25 | 1 | -1/+2 |
| | |||||
* | 37434: POSIXBUILTINS "command" should prevent shell exit on errors from ↵ | Barton E. Schaefer | 2015-12-25 | 1 | -3/+5 |
| | | | | special builtins | ||||
* | 37202: suppress WARN_CREATE_GLOBAL warnings after a fork | Peter Stephenson | 2015-12-04 | 1 | -1/+1 |
| | |||||
* | unposted: fix init_io() calls in previous change | Peter Stephenson | 2015-12-04 | 1 | -1/+1 |
| | |||||
* | 37092: make nested ${(P)name} properly refer to parameter on return | Peter Stephenson | 2015-11-11 | 1 | -7/+9 |
| | |||||
* | 36853: replace pushheap/popheap by NEWHEAPS/OLDHEAPS in doshfunc() to ↵ | Barton E. Schaefer | 2015-10-14 | 1 | -201/+201 |
| | | | | | | optimize memory management Includes re-indentation that was not done in the posted patch. | ||||
* | unposted: back out 36707, add test case for 36766 | Barton E. Schaefer | 2015-10-03 | 1 | -1/+1 |
| | |||||
* | 36766: fix incorrect reset of noerrexit during "if" conditions | Barton E. Schaefer | 2015-10-03 | 1 | -1/+2 |
| | |||||
* | 36707: distinguish ERR_RETURN value of retflag so that execif() can ignore ↵ | Barton E. Schaefer | 2015-09-30 | 1 | -1/+1 |
| | | | | it in the test sublist | ||||
* | 36651: WARN_CREATE_GLOBAL += math expressions | Daniel Shahaf | 2015-09-27 | 1 | -1/+2 |
| | | | | | Without this, '() { (( x=42 )) }' and '() { for (( i=0; … )) }' wouldn't warn about $x and $i, respectively, being created global. | ||||
* | 36378: skip directories when looking for files to autoload | Peter Stephenson | 2015-09-02 | 1 | -1/+3 |
| | |||||
* | 36104: change order of child_block() and dont_queue_signals() to resolve yet ↵ | Barton E. Schaefer | 2015-08-11 | 1 | -1/+1 |
| | | | | another race condition |