1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-09-28 06:49:49 +02:00
Commit Graph

979 Commits

Author SHA1 Message Date
dana
632023acc2 44100: zparseopts: Add -F option, completion, tests; improve documentation
* Enable zparseopts to perform basic usage validation (aborting on an
  unrecognised option-like parameter)

* Officially document the resolution of ambiguous option specs
2019-03-12 19:03:56 -05:00
Jun-ichi Takimoto
2055ee92e7 unposted: ztst.zsh: fix a typo 2019-03-01 14:57:55 +09:00
dana
ed4c8f3d5e 44030: prompt: Return error for unrecognised colour name 2019-02-03 11:55:40 -06:00
dana
e3cab52ca2 44012: X04zlehighlight: Fix spurious test failures on OpenBSD 2019-01-23 20:35:38 -06:00
Mikael Magnusson
d683d278c7 44011: Only use fg_start_code for non-truecolor
The sequence for truecolor uses a different prefix from palette colors
2019-01-23 11:51:42 +01:00
dana
92b204cb12 43962: Fix X04 test module_path 2018-12-31 10:03:08 -06:00
Peter Stephenson
de31fe1f93 users/23809: ZLE_HIGHLIGHT extensions.
Allow non-termcap use of colours > 7.
Add tests.
2018-12-30 18:18:34 +00:00
Martijn Dekker
2d056ebc31 43945 (tweaked to remove test failure, noted in test):
Fix exit statuses from wait for POSIX_BUILTINS mode.
Also add tests.
2018-12-30 18:11:43 +00:00
Martijn Dekker
4215fcb107 43944: apply NO_UNSET consistently to arithmeitc 2018-12-30 18:03:02 +00:00
Peter Stephenson
d0f92b448e unposted: test for 43938 2018-12-30 17:59:26 +00:00
dana
162c198aab 43953: Fix rounding/truncation error in %. time-format specifier
Also fixes an issue where %. couldn't be used more than once in a format
string without strange results

Tweaked very slightly per workers/43954
2018-12-29 05:24:25 -06:00
dana
f64cd71d44 43935: Reject too-large nanosecond values given to strftime
... and, in so doing, fix an error in the tests on 32-bit machines.

The value for the new too-large test is changed slightly from the patch posted
to the ML to make it test for the right thing on 32-bit machines as well.
2018-12-24 02:42:18 -06:00
Peter Stephenson
50f8fa972c 43837 plus test from Daniel: Empty string in nested subst.
Skip Nularg or there is a bogus character at the start.
2018-11-21 10:10:03 +00:00
dana
5ad76492af 43800: Add nanosecond support to strftime built-in 2018-11-13 13:01:01 -06:00
Daniel Shahaf
73b1328049 43726: Add tests for semicolon in the middle of a sublist not terminating it. 2018-10-24 15:31:42 +00:00
Peter Stephenson
f19266cf99 unposted: another couple of tests for previous commit.
This tests different code paths as the -c command option exits
in a different fashion from code executed from a script.
2018-10-10 12:11:27 +01:00
Peter Stephenson
0d3a786b7c 43669: ensure explicit exit status is used over implicit 2018-10-10 11:17:58 +01:00
Peter Stephenson
bbccbe0c85 43660: extend 43653 when final exit is implicit.
Combine logic for case after committed to exit (shell_exiting) with
case where exit occurred in a function we nee to unwind (exit_pending).

Add sarky note for future generations to be confused at.
2018-10-09 14:38:26 +01:00
Peter Stephenson
afee3c9a19 unposted: addition to previous trap test suggested by Mikael 2018-10-09 11:15:48 +01:00
Peter Stephenson
d768a7492a 43653: explicit exit from EXIT trap overrides exit status 2018-10-09 10:05:05 +01:00
Peter Stephenson
f99f7dca75 43616: Various parameter setting and display fixes.
Mostly to do with typeset -p and tied variables and their interaction.

Some general tied variable fixes.
2018-10-08 10:10:42 +01:00
Daniel Shahaf
64a26b2091 unposted: Add a test for 43546. 2018-09-25 16:38:38 +00:00
Daniel Shahaf
dc2bfeee26 43493: Have V07pcre fail if PCRE was enabled by configure (config.modules) but failed to load for any reason. 2018-09-24 14:15:18 +00:00
Peter Stephenson
1056827194 43466: Make path(5) test more generic.
Only test non-zero status as OS error codes and messages vary.
2018-09-14 09:22:08 +01:00
Peter Stephenson
d6859ce68e 43426: disable job control tests involving suspension.
These are provoking races on OpenSUSE.
2018-09-10 13:48:41 +01:00
Peter Stephenson
9bc7e5b404 43375 with fix from 43390: fix #! tests.
Don't assume path to sh and echo, instead work it out.
2018-09-05 17:58:41 +01:00
Anthony Sottile
1c4c7b6a4d
CVE-2018-0502, CVE-2018-13259: Fix two security issues in shebang line parsing.
See NEWS for more information.

Patch by Anthony Sottile and Buck Evan.
2018-09-03 15:07:47 +00:00
dana
b21a641d4c 43275: Add log2 to match func 2018-08-13 09:36:55 +01:00
Peter Stephenson
f58b35bf88 43264: fix ${+assoc[nonexistent]} with KSH_ARRAYS 2018-08-09 09:48:35 +01:00
Peter Stephenson
225b35c907 43261: Fix unary minus with base.
Apply unary minus to a complete lexical constant rather than the
first component that comes along.
2018-08-08 17:11:54 +01:00
Peter Stephenson
17178db1a4 users/23531: Error exit/return fixes.
Fix regression with trap on left hand side of pipe.

Fix forced return from shell structure within nested function.

Fix tests exiting too early.

Add new test case.
2018-07-09 11:07:53 +01: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
Peter Stephenson
b05a56a415 unposted: V01zmodload.ztst needs update for parameter module fix 2018-06-18 15:39:19 +01:00
dana
b066cc3ea9 42297: (e) subscript flag needs extra work with scalars 2018-05-14 16:54:19 +01:00
Oliver Kiddle
a93abe1170 42488: test cases for 42369 and address some issues in the code 2018-05-13 10:13:42 +02:00
dana
805192311f 42101 (tweaked): assigning shell status to array was broken 2018-05-11 09:29:14 +01:00
Ricardo Giorni
f7519811e1 47201: fix 42355 for multiple backslashes 2018-04-29 12:05:39 -07:00
Peter Stephenson
2d3b3510a8 c.f. 42726: Back off fg and bg tests.
This is too hard to make robust.  Problems include
- Reading input in different places causes lines to appear and disappear
- There is no easy way to sequence the asynchronous operations
  following bg.
- Response to job control of user commands on some OSes (MacOS,
  for example) is unpredicatble.
2018-04-26 09:42:25 +01:00
Peter Stephenson
bdd595321f 42722: Replace ed with dc in fg/bg tests.
This should be even simpler.

Also more fix ups for failed pattern diffs.
2018-04-25 18:16:02 +01:00
Peter Stephenson
c6dbd862d0 42714: Add fg and bg tests.
Use ed to get minimal user interaction without needing
advanced terminal handling.

Improve test output of failures of pattern differences.
2018-04-25 10:16:51 +01:00
Peter Stephenson
95d861d028 42708: fix for process substitution.
Don't close associated file descriptors in the closem()
tidy up function as they should remain visible to external
processes.  Override if about to exit.

Unit test for the failing case: note this relies on the
existence of /proc/self/fd or equivalent.
2018-04-24 11:48:11 +01:00
Oliver Kiddle
65b265f3c0 42624 (plus test): avoid freeing memory that's still needed
This was occurring in a multiple function definition where a
function name is duplicated.
2018-04-12 23:15:29 +02:00
Oliver Kiddle
25da576c29 42575: fix to not complete options in the argument to another option 2018-04-05 11:14:58 +02:00
Peter Stephenson
3517e4a9a5 42581(?): Fix ZLE inline history expansion.
Seen with magic-space.

If there's a parse error in command subtitution we need to complete
reading history to ensure the command line buffer is finished.
2018-04-04 18:33:00 +01:00
Martijn Dekker
fa0105f78c 42538: Temporarily set umask for here document.
Done while signals are queued.
2018-03-27 09:32:55 +01:00
Peter Stephenson
47aa60950c 42355: Fix use of backslashes on here doc input.
Handling of white space in particular was confusing and inconsistent
with other shells.
2018-02-12 10:06:45 +00:00
dana
1af28cbfd7 42164: fix digits in format escapes in completion listings 2018-01-04 17:16:18 +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
dana
932ed86483 dana: 42145: Fix additional completion cases with option arguments. 2017-12-20 09:07:28 +00:00
Daniel Shahaf
4b55c0f40c 42146: type -w += global aliases
Follow-up to 36403, which did the same for suffix aliases.
2017-12-20 05:43:42 +00:00