1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-11-06 20:10:58 +01:00
Commit graph

3588 commits

Author SHA1 Message Date
Peter Stephenson
a32fb005d6 40486: Don't warn on creation of MATCH etc. in regex.
This because they are created implicitly rather than by explicit
user request, so the warning may not be useful.
2017-02-02 10:03:57 +00:00
Barton E. Schaefer
caddeca1ac 40483 (cf. Eric Freese: 40482): Remove zpty exit hook from forked processes 2017-02-01 17:11:48 -08:00
Daniel Shahaf
ad1b46578e 40460: WARN_NESTED_VAR: Don't warn when assigning to a slice of an existing array 2017-02-01 01:49:45 +00:00
Barton E. Schaefer
6557aa4710 40469: change strategy from 40453 to use patcompile(PAT_HEAPDUP) instead of signal queueing. 2017-01-30 08:03:47 -08:00
Barton E. Schaefer
e51c9c17af 40453: signal handler safety for callers of patcompile(PAT_STATIC), which is not re-entrant. 2017-01-29 08:30:14 -08:00
Barton E. Schaefer
0672c75359 40439: PAT_HEAPDUP definition just for clarity 2017-01-28 15:37:27 -08:00
Peter Stephenson
34f70c5dc0 40440: Add $functions_source hash to zsh/parameter.
This allows you to find out where a function was loaded from.
2017-01-28 19:33:27 +00:00
Peter Stephenson
8575e2ba57 40425: HAVE_* tests for getutxent etc.
Not yet 100% clear where the #if's go, depends on how various
systems implement the old or new formats.
2017-01-27 10:26:34 +00:00
Peter Stephenson
1633b2800d 40423: WARN_NESTED_VARS, conversion the other way 2017-01-26 20:07:51 +00:00
Peter Stephenson
80e47a9a5d 40422: More WARN_NESTED_VAR cases.
Converting type when using a calling scope was broken in the
original patch.
2017-01-26 19:58:17 +00:00
Peter Stephenson
b3637caa90 40413: WARN_NESTED_VAR subscripted variable fix.
No warning needed on paramter that's created temporarily to
help assignment.
2017-01-25 09:35:30 +00:00
Peter Stephenson
3e5badb0c9 40404: Only quote command in whence output with -v. 2017-01-24 11:12:41 +00:00
Peter Stephenson
c861b17bbf 40391: Add WARN_NESTED_VAR option and functions -W.
These are companions to WARN_CREATED_GLOBAL, warning when a variable
from an enclosing scope is altered.
2017-01-23 09:50:57 +00:00
Peter Stephenson
4d6097657c 40375: autoload with explicit path mustn't trash already loaded function.
Also remove unnecessary dupstring() on already duplicated string
when expanding =cmd.
2017-01-18 09:57:55 +00:00
Peter Stephenson
c2f1951ba3 40369: code should have been committed with 0a2d92f98 2017-01-17 10:05:32 +00:00
Peter Stephenson
f90a0447aa 40353 with tweaks to whence -v: extend directory cache use.
Now used for all autoloaded functions after load, including those
where the file was found along fpath, reducing duplication of
directory names.
2017-01-16 10:31:56 +00:00
Peter Stephenson
ebd7fdd932 40362: Fix setting of parameter values in compvalues 2017-01-15 17:15:04 +00:00
Peter Stephenson
00f16c8e68 unposted: one missing *name = NULL 2017-01-12 20:59:24 +00:00
Peter Stephenson
178e62dbfe 40342: Add directory name cache for autoload file paths.
This renders "autoload /blah/blah/*" as efficient as use of
fpath.
2017-01-12 20:56:20 +00:00
Peter Stephenson
33799ae2b0 40335: More care with autoload function path.
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.
2017-01-12 13:54:29 +00:00
Jens Elkner
d3cf8816dc 40333: Fix the watch interface for utmpx 2017-01-12 09:58:51 +00:00
Oliver Kiddle
b6082cd1e2 40321: _arguments option groups 2017-01-11 20:50:02 +01:00
Peter Stephenson
47b7f2adef unposted: more care with shell function filename.
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.
2017-01-11 12:11:22 +00:00
Peter Stephenson
f26d1ba6b0 Add features associated with autoloading a function using an absolute
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.
2017-01-11 11:26:13 +00:00
Peter Stephenson
34656ec2f0 40305: fix some problems redisplaying command line after interrupt.
Back off previous fix as this only covered some subset of problems.

Remaining problems happend after reset-prompt in TRAPINT.

One was in complist and is fixed by not attempting to list after
an error or interrupt.

The other was owing to not resetting clearflag when ZLE
was re-entered.
2017-01-10 19:18:52 +00:00
Peter Stephenson
bb218704d2 40306 with doc tweaks: Change behaviour expanding alias in () function definition.
Now an error unless the () is part of the same error as the name.
Add ALIAS_FUNC_DEF option to allow it again.
2017-01-10 19:14:26 +00:00
Peter Stephenson
48cadf48ff 40285: Be more careful with pattern allocation in history isearch.
If there are ZLE hooks to be called, they may use patterns, in
which case it's not safe to allocate the isearch pattern in the
static buffer.
2017-01-06 17:42:13 +00:00
Daniel Shahaf
9d87cd948e 40270 (after 39995): Add cross-reference for robustness. 2017-01-05 15:58:18 +00:00
Oliver Kiddle
c2b7c5abbe 40269: handle option exclusion within current word for clumped options
This replaces the change made in 13999 with an alternative approach.
2017-01-05 13:31:13 +01:00
Oliver Kiddle
8be732cbcc 40227: handle _arguments sets and rest arguments starting with a dash
This is a new approach to the problem first covered by 39611: checking
to see if an option-like argument belongs to one of the other sets.
2017-01-04 14:50:56 +01:00
Oliver Kiddle
a69b19d215 40226: tidy up some of the _arguments set code
Remove old code for applying explicit exclusions between sets which
fixes some odd behaviour. Some struct members were unused. Also added
some comments and test cases.
2017-01-04 14:42:39 +01:00
Barton E. Schaefer
c4dba4f2e6 users/22319: ${ary1:^ary2} should not change isarr state of expansion of ary1
Unless ary1 is made from a scalar, semantics of (@) in double quotes is lost.
2017-01-03 14:44:12 -08:00
Barton E. Schaefer
d0f7a3b2d6 40248: suppress errors from zshaddhistoryhook
and do not call it if no history entry will be written
2017-01-03 14:43:32 -08:00
Peter Stephenson
e90a512aa6 40265: Fix problems with pure string in patterns with Meta.
Copy instead of relying on jiggery pokery with memory reallocation.

Problem was triggering with string ending with Dash converted to -.
2017-01-03 14:43:41 +00:00
Paulo Andrade
8d4c98540d 40260: zero new space allocated in prompt buffer 2017-01-03 12:00:18 +00:00
Sebastian Gniazdowski
4fb4ce190c 40231: Optimise setarrvalue(). 2016-12-28 05:29:59 +00:00
Oliver Kiddle
02eb1595e8 40162: _arguments support for a match spec in combination with sets 2016-12-22 16:12:42 +01:00
Barton E. Schaefer
dc1f3aae60 40179: fix handling of "printf -" and "printf --"
unposted: regression test for 40179 / 37467
2016-12-14 11:01:09 -08:00
Barton E. Schaefer
efd3baf2a2 40134: silence spurious compiler warnings. 2016-12-10 19:13:53 -08:00
Daniel Shahaf
7e40a89053 40117: Revert a hunk of 40035 that changed semantics incorrectly. 2016-12-09 10:37:04 +00:00
Oliver Kiddle
8c4e1b6832 40129: revert 39611, add code comments and test cases for _arguments 2016-12-09 00:00:30 +01:00
Oliver Kiddle
7630215ba0 40119: correct typo in comment 2016-12-08 23:55:53 +01:00
Peter Stephenson
0e4aa6f2f6 Additional case for ERR_RETURN and ERR_EXIT.
Don't trigger just because status is non-zero at end of
current shell group.
2016-12-05 12:29:23 +00:00
Peter Stephenson
c03228f9ed Extra case for ERR_RETURN and ERR_EXIT.
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.
2016-12-05 11:21:01 +00:00
Barton E. Schaefer
a409adc33b 40071: change Dash back to "-" before evaluating named directory expansions 2016-12-03 15:00:46 -08:00
Daniel Shahaf
334ed65e27 40068: Abort execution when setuid/setgid fail.
The incumbent code would print an error message and continue execution
with the previous uid/gid values, not even setting lastval:

    % UID=42 id -u; echo $?
    zsh: failed to change user ID: operation not permitted
    1000
    0
    %
2016-12-03 10:00:08 +00:00
Daniel Shahaf
fd2ca229dd 40067: internal: Document 'cmatcher', parse_cmatcher(), 'comptoend', unsetparam_pm(), and getindex(). 2016-12-03 09:54:11 +00:00
Jun-ichi Takimoto
e8699613bc 40050: prepend /**/ to global functions and #ifdefs 2016-12-01 08:58:29 +09:00
Peter Stephenson
e8df1c7056 40043: fix computil.c indentation (cosmetic) 2016-11-30 16:19:21 +00:00
Barton E. Schaefer
3ba86f4db4 40034: clear badcshglob when ignoring errors 2016-11-29 12:35:57 -08:00