1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-23 16:40:24 +02:00
Commit graph

3661 commits

Author SHA1 Message Date
Peter Stephenson
ae10f88bfb 41386: when backgrounding a STAT_CURSH job, remove the flag.
This typical applies to a STAT_SUPERJOB.  It prevents it from
getting copied interrupts as a foreground process.
2017-07-02 21:00:56 +01:00
Peter Stephenson
e8edd42f7f 22760: fix partial string length reports with NO_MULTIBYTE 2017-07-02 20:29:00 +01:00
Peter Stephenson
e19955614f 41368: Add missing unqueue_signals() to compctl. 2017-06-27 10:12:55 +01:00
Phil Pennock
825f84c77e 41308 (tweaked): behaviour of PCRE with NUL bytes 2017-06-22 09:24:33 +01:00
Mikael Magnusson
8a62bbb46a 41319: dupstring a possibly readonly string before modifying 2017-06-19 16:18:36 -07:00
Barton E. Schaefer
9de905b22f 41322: reduce number of changes in signal queuing/blocking state during shingetline() to improve read speed 2017-06-19 16:14:32 -07:00
Barton E. Schaefer
a5ed661f25 41317: use heap allocation in getoutputfile() to plug memory leak
Heap is usable ever since addfilelist() of workers/31528 (commit 3c573222).
2017-06-19 16:06:38 -07:00
Barton E. Schaefer
efae75f648 41242: zstrbcmp(...) removed in favor of zstrcmp(..., SORTIT_IGNORING_BACKSLASHES)
This should make sorting consistent in completion listings vs. elsewhere.
2017-06-17 10:25:43 -07:00
Stephane Chazelas
4d007e269d 41275: Leave stdin open when executing widgets 2017-06-13 21:34:55 -04:00
Peter Stephenson
eb783754bd 41284: Fix NULL dereference in cd.
This happened in sh compatiblity mode if HOME was not set
and cd was used with no argument.
2017-06-13 15:41:00 +01:00
Peter Stephenson
d5c22d356b 41244: Add zmodload -s option.
Doesn't complain if module is unavailable, but prints more
obscure errors.

Use existing low-level silent flag by passing through
intermediate module loading hierarchy.
2017-06-12 10:10:23 +01:00
Peter Stephenson
d4947e67cc 41239: Save and restore default history event on context stack.
This ensures that the default event set by an expansion in ZLE
doesn't propagate to the command line expansion.
2017-06-07 10:03:41 +01:00
Barton E. Schaefer
11d2dbda38 41225: sethparam() should not attempt to change special parameters into hashes 2017-06-05 09:45:45 -07:00
Peter Stephenson
a6135f6114 41191: Check for immortal thingies when checking for specific thingies 2017-06-01 17:56:14 +01:00
Peter Stephenson
151a4660e2 41164: Don't free a history entry if it's curline.
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.
2017-05-30 09:39:32 +01:00
Sebastian Gniazdowski
284b5aaeb0 41151: propagate flags when creating new parameter 2017-05-28 13:17:26 -07:00
Sebastian Gniazdowski
ca0607c4c2 41153: finish module setup only after all error conditions have been checked 2017-05-28 13:15:06 -07:00
Sebastian Gniazdowski
62c416915b 41146: careul in GDBM freeing strings with embedded nulls 2017-05-24 15:55:42 +01:00
Sebastian Gniazdowski
135075e48c 40898: fix GDBM error handling 2017-05-24 15:53:42 +01:00
Stephane Chazelas
99fff8f15c 41142: Ensure close-on-exec is passed to moved file descriptor 2017-05-23 17:03:31 +01:00
Peter Stephenson
94014ff65b 41113 (tweaked): Save current line linkage to history ring.
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.
2017-05-18 09:33:08 +01:00
Jun-ichi Takimoto
171e7fa4c1 41090: Replace iswprint() if unicode9 is enabled.
If wcwidth() or iswprint() is broken, force enable unicode9.
2017-05-12 12:10:13 +09:00
Peter Stephenson
4bb81eefbd 41096: Don't assume null termination copying string.
At this point the string may contain embedded nulls or not have
a null termination at all.

Also, as we always have the length memcpy() is more efficient.
2017-05-11 17:33:30 +01:00
Peter Stephenson
c7a9cf465d 40181: Fix buffer overrun in xsymlinks.
There was no check for copying to the internal xbuf2 for a
preliminary test.
2017-05-09 17:49:18 +01:00
Peter Stephenson
263a0c2476 41078: Empty psvar could cause bad dereference in prompt expansion 2017-05-09 09:46:23 +01:00
Peter Stephenson
af1c82d646 40173: Off-by-one error checking for {varid}.
This caused a single unprintable character in braces before a
redirection to be treated as an indentifier.
2017-05-08 18:00:55 +01:00
Peter Stephenson
641a764b82 users/22688: Allow mixing redirs and arguments after anon functions.
These are parsed differently from the case of normal functions which
can't take normal arguments at that point.
2017-05-08 17:19:22 +01:00
Peter Stephenson
f25d01a97c Fix combination of HERE document and |&.
A missing flag setting up the HERE document mean that the size
of the wordcode needed to append the 2>&1 was counted incorrectly,
so the resulting wordcode was garbled.

Add test.
2017-05-08 10:54:08 +01:00
Peter Stephenson
21b195562a 41043: Close pipes in shell when disowning background job.
This was missing in the case of &,, causing a file descriptor leak.
2017-05-03 11:30:15 +01:00
Peter Stephenson
ed4e37e45c 41020: Fix "command -p"; "-p" was incorrectly left in command arguments
Also add tests for known precommand modifier issues.
2017-04-28 10:22:43 +01:00
Peter Stephenson
d7110d8f01 41012: Fix premature exit from nested function in EXIT trap.
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.
2017-04-27 18:56:18 +01:00
Peter Stephenson
408b92b168 41008: Handle expansions for precommand modifiers 2017-04-26 09:44:38 +01:00
Peter Stephenson
68466f327e 40995: Don't disable alias expansion when finding command substitution limits
This is needed in some unusual cases in order to identify the exit
condition without encountering a parse error.
2017-04-23 17:06:26 +01:00
Jun-ichi Takimoto
3c78f14d5c 40994: unmeta_one() need not count Meta 2017-04-23 23:58:44 +09:00
Peter Stephenson
a2e2f5668d 40990: Fix crash with bogus path in sh emaulation.
When startying in sh emulation don't link PATH-style parameters
to array equivalents.  To allow this to function, don't check
for the linkage when exporting the colon-separated parameter.
2017-04-21 18:07:42 +01:00
Barton E. Schaefer
fc96274801 40977: "emulate" disallows "--help" and "--version" 2017-04-15 21:16:11 -07:00
Orlov Sergey
a11b241d4a 40935: User names need metafying.
On some systems they can contain 8-bit characters and on all systems
this is logically correct anyway.
2017-04-10 09:55:06 +01:00
Bart Schaefer
ca2a43f23c 40940: untokenize names of condition features before attempting to look up the definition from a module.
Necessary because of 40760 (tokenization of '-' as Dash).
2017-04-07 22:35:00 -07:00
Peter Stephenson
8b5102ccf5 40933: Ensure we get job text in sourced files.
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.
2017-04-04 18:54:10 +01:00
Peter Stephenson
f6ab9a281d 40932: Parameter subscripts need to count parentheses.
Otherwise they can terminate in the middle of an expression.
2017-04-03 10:04:03 +01:00
Barton E. Schaefer
207263a61e 40929 (replaces 40598): paramsubst() should always return scalar when PREFORK_SINGLE was passed in from prefork()
Previous commit (74fe4d09) consumed too much of the input linked list,
leading to later expansions being skipped.  This commit converts from
array to string sooner, but may thereby alter rc_expand_param and array
element uniqueness behavior.
2017-04-02 14:43:27 -07:00
Peter Stephenson
e78ec8610d 40891: fix more zero-length matches.
This time at the end of the trial string.
2017-03-23 21:01:59 +00:00
Peter Stephenson
086656241c 22601: Fix for parameter substitution pattern matches.
It was not possible to math against a zero-length string in
some cases.
2017-03-23 09:35:20 +00:00
Barton E. Schaefer
420fc41b7c 40832: fix $x:P when PWD=/ 2017-03-11 14:40:12 -08:00
Peter Stephenson
adab02817f 40819: Fix IS_DASH test in BRACE_CCL handling 2017-03-10 10:43:25 +00:00
Jun-ichi Takimoto
c09af3516f unposted: declare file local variables as static 2017-03-10 18:44:41 +09:00
Jun-ichi Takimoto
4d7b34c5f3 unposted: silence warnings on Cygwin
On Cygwin, h_name in struct hostent is 'const char*'
2017-03-10 18:41:25 +09:00
Peter Stephenson
64559abc1f 40796: MAGIC_EQUAL_SUBST not needed with parsed assignment.
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.
2017-03-09 09:52:23 +00:00
Barton E. Schaefer
c93f29b52d 40799: fix $- expansion partly broken by 40760 2017-03-08 21:33:25 -08:00
Barton E. Schaefer
071017965f 40763: count wide characters and Cmatcher pointers more sanely in cfp_matcher_pats(), and count characters in pattern_match() the same way to stay in sync
Might not fix wide-char matching in completion matcher-lists but should
avoid wild pointer crash
2017-03-08 21:26:55 -08:00