Jun-ichi Takimoto
ad9f07e66f
43227: fix memory leaks in term{cap,info}.c
2018-08-01 21:36:44 +09:00
dana
394f3a47e4
43075: Support nanosecond-precision time formatting
...
* Teach ztrftime() %9. and %N for nanoseconds
* Update prompt expansion to pass sub-second times for time formatting
* Update zsh/stat to pass sub-second times for atime/mtime/ctime
Patch heavily based on Oliver's earlier work @ workers/24059
2018-06-20 17:29:56 -05:00
Barton E. Schaefer
68d9526220
42650: fix 42156 for zero-sized terminals
...
Also fix harmless no-op typo from hand-applying 42636 for previous commit.
2018-04-15 11:06:43 -07:00
Barton E. Schaefer
517cda3832
42636: fix GLOB_DOTS for !(RM_STAR_SILENT)
...
Also fix paste-o in older log entry
2018-04-15 10:57:27 -07:00
Oliver Kiddle
31f7220563
42607, CVE-2018-1100: check bounds on buffer in mail checking
2018-04-07 18:28:38 +02:00
Oliver Kiddle
bd05c4b2de
42595: remove dead code flagged by coverity
2018-04-07 14:37:46 +02:00
Oliver Kiddle
bdf09270be
42560: silence sign-compare compiler warnings
2018-03-30 12:13:59 +02:00
Oliver Kiddle
c053c6a079
42539: prevent overflow of PATH_MAX-sized buffer in spelling correction
2018-03-28 09:00:58 +02:00
Martijn Dekker
fa0105f78c
42538: Temporarily set umask for here document.
...
Done while signals are queued.
2018-03-27 09:32:55 +01:00
Barton E. Schaefer
9bc391105f
42480: optimize $#var for single-byte character sets
2018-03-25 18:01:25 -07:00
Oliver Kiddle
679b71ec4d
42518, CVE-2018-1071: check bounds when copying path in hashcmd()
2018-03-24 15:04:02 +01:00
Peter Stephenson
2cbf6b6a19
42332: Special case unsigned printf formats.
...
For constants we can avoid a conversion to signed by examining
the expression before passing to math eval.
2018-01-31 09:14:40 +00:00
Peter Stephenson
5f6a52c06c
42156: new CHECK_RUNNING_JOBS option demanded by bash groupies
...
Also new job options.
Also suppress debug error if rows or columns are reported as zero as
this is normal without a physical terminal.
2017-12-22 20:21:23 +00:00
Daniel Shahaf
ced82745ea
unposted (cf. 41672): checkrmall: Record the 41672 bug in a TODO.
2017-09-21 18:17:19 +00:00
Daniel Shahaf
15bed0db40
unposted (cf. 41707): internal: Document the count==0 case of checkrmall().
2017-09-21 18:14:01 +00:00
Daniel Shahaf
ed7497e379
unposted: internal: Document zreaddir().
2017-09-11 15:06:08 +00:00
Peter Stephenson
a9b579a9d3
Revert "41499 (with one further tweak): POSIX_STRINGS behaviour."
...
This reverts commit 2eacbef919
.
Conflicts:
ChangeLog
2017-08-08 19:04:49 +01:00
Peter Stephenson
2eacbef919
41499 (with one further tweak): POSIX_STRINGS behaviour.
...
Ignore a terminating delimiter when splitting as separators
despite being called separators are terminators.
2017-08-07 18:47:43 +01:00
Martijn Dekker
a51cd62b45
41484: Make ${(q+)...} quote backsleshes.
2017-08-03 21:32:20 +01:00
Peter Stephenson
e8edd42f7f
22760: fix partial string length reports with NO_MULTIBYTE
2017-07-02 20:29:00 +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
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
Jun-ichi Takimoto
3c78f14d5c
40994: unmeta_one() need not count Meta
2017-04-23 23:58:44 +09: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
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
Peter Stephenson
f3f8537cfa
40760: Always tokenize unquoted - to Dash.
...
This fixes use of pattern match character ranges in unusual contexts.
Attempt to detect a tokenized - in cases where we don't care.
2017-03-07 10:43:58 +00:00
Daniel Shahaf
b3a88a53d3
39982: $SPROMPT: Don't accept a spelling correction at space/tab.
...
The patch also downscopes a couple of local variables, with no
functional change.
2016-11-24 08:18:28 +00:00
Peter Stephenson
a62e1640bc
39958: Add extra byte to PATH_MAX allocations.
...
This ensures we've got enough space for a null, although this
isn't always needed.
2016-11-17 19:49:17 +00:00
Barton E. Schaefer
98b7960c78
39943: no need to compute arrlen() in arrdup_max() when max == 0.
2016-11-15 10:04:14 -08:00
Peter Stephenson
921b39ac6b
39949: Special case for "-" in directory names.
...
It can be sh-tokenized to Dash to allow for appearing in ranges
after substitution, so needs to be turned back to "-" in that case.
2016-11-15 18:01:32 +00:00
Peter Stephenson
99acd1e7f4
39906: More multibyte optimisations for US-ASCII.
...
This treats characters 0 to 0x7f as single byte US-ASCII along
the lines we already do in other places in the code.
2016-11-14 10:12:04 +00:00
Peter Stephenson
a1633e09a7
39886 based on 39877: Optimise arrdup to arrdup_max.
...
Only duplicate as much of the array as is needed.
2016-11-09 11:54:57 +00:00
Peter Stephenson
1683371fa5
unposted: follow up to 39867: don't need test against zero
2016-11-08 10:51:03 +00:00
Peter Stephenson
39521515c3
39867, tweaked: Use cast to unsigned char to test character.
...
We want the unsigned variant to be <= 0x7f. Use the normal STOUC()
macro and turn this into a single test.
2016-11-08 10:09:26 +00:00
Peter Stephenson
9c68ef083b
39825: optimise mb_metastrlenend() for 7-bit character.
...
As the shell relies intimately on US-ASCII as a subset we can
skip the multibyte functions if we are dealing with a complete
7-bit character.
2016-11-04 09:56:51 +00:00
Barton E. Schaefer
e61ed2b80d
39470: failure to open a supposedly unique temp file name should result in an error
...
Also band-aid for signal-related race conditions in temp file name generation
2016-09-29 11:16:24 -07:00
Daniel Shahaf
f368720b8b
39252: internal: quotestring: Drop the 'e' parameter, which no caller uses.
2016-09-11 09:22:18 +00:00
Jun-ichi Takimoto
acad0620ef
39087: fix 'conditionally uninitialized' variables
2016-08-23 18:18:50 +09:00
Daniel Shahaf
7154052ebe
39046 + 39061: New :P history modifier.
2016-08-22 03:34:30 +00:00
Daniel Shahaf
f9b1703511
38971: Start using the new arrlen_ge() / arrlen_le() helpers.
2016-08-01 08:01:29 +00:00
Daniel Shahaf
1a368bf31f
38973: Optimize indexing array parameters.
...
% () { for 1 in $prefix/zsh/bin/zsh Src/zsh; do $1 -f -c 'a=( {1..1000000} ); repeat 3 time ( repeat 300 : $a[1] )'; done }
( repeat 300; do; : $a[1]; done; ) 1.68s user 0.01s system 98% cpu 1.718 total
( repeat 300; do; : $a[1]; done; ) 1.69s user 0.01s system 99% cpu 1.710 total
( repeat 300; do; : $a[1]; done; ) 1.69s user 0.01s system 99% cpu 1.714 total
( repeat 300; do; : $a[1]; done; ) 0.00s user 0.01s system 72% cpu 0.022 total
( repeat 300; do; : $a[1]; done; ) 0.00s user 0.01s system 72% cpu 0.022 total
( repeat 300; do; : $a[1]; done; ) 0.01s user 0.01s system 69% cpu 0.023 total
2016-08-01 08:01:28 +00:00
Peter Stephenson
8cf68f05ab
21603: Make read_poll more interruptible.
...
If we interrupted the first read we still did the fallback read.
This is wrong.
2016-06-02 11:01:39 +01:00
Peter Stephenson
6d82ce161a
37946: make rm * warnings more informative.
...
Now count files that would be deleted up to 100.
2016-02-11 15:23:57 +00:00
Jun-ichi Takimoto
a4020e10a3
37868: add 'static' to file local variables
2016-02-03 01:25:33 +09:00
Kamil Dudka
69c86cd2c3
37780: Care printing error if nothing to print.
2016-01-25 17:15:23 +00:00
Peter Stephenson
be32864e6f
37776: Set errflag before calls to zwarning().
...
This avoids an attempt to call zerr() or zerrnam() recusrively.
2016-01-25 15:43:06 +00:00
Peter Stephenson
8eb9070d67
37678: Now possible to quote "-" in pattern range
2016-01-19 09:55:46 +00:00
Daniel Shahaf
69379369da
unposted: Extend docstring of callhookfunc().
2016-01-15 06:30:12 +00:00
Peter Stephenson
7f5b2f5709
37348: Tests and fix for ${(q+)...}.
...
Needs dupstring() for empty string case.
2015-12-08 15:08:24 +00:00
Peter Stephenson
f5b8efa7e0
37344: restore old printable quoting, add ${(q+)...}.
...
The \C- form is only used inside quotedzputs().
${(q+)...} outputs a quotedzputs() representation.
2015-12-07 21:49:07 +00:00