1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-12-29 16:25:35 +01:00
Commit graph

847 commits

Author SHA1 Message Date
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
Oliver Kiddle
02eb1595e8 40162: _arguments support for a match spec in combination with sets 2016-12-22 16:12:42 +01:00
Daniel Shahaf
6bdb2e1deb 40203: Resolve 'printf --' question from grandparent commit (thanks Chet). 2016-12-16 00:59:57 +00:00
Barton E. Schaefer
c3e43541c0 40198: output of B02typeset differs when (( UID == 0 )) so do not attempt to redo that test in that case 2016-12-15 11:22:22 -08: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
Daniel Shahaf
74b7c6b7d6 40139: tests: Convert comments to diagnostics; test backslashes. (after 40129) 2016-12-10 17:16:37 +00:00
Peter Stephenson
063391f0d9 unposted: minor D07 typos 2016-12-09 10:31:47 +00:00
Peter Stephenson
2e307108a0 40138: Move regex multibyte test.
Put it last as it has an additional dependency.

Output a failure message indicating this.
2016-12-09 10:18:24 +00:00
Oliver Kiddle
8c4e1b6832 40129: revert 39611, add code comments and test cases for _arguments 2016-12-09 00:00:30 +01:00
Barton E. Schaefer
88d12b809a 40110: attempt to fix test failures on Solaris
B02typeset: ignore strerror text in test output, it differs by OS

C02cond: discard stderr when looking for a path to the "mount" command
2016-12-06 21:32:14 -08:00
Peter Stephenson
98e297931a 40102: Use subdirectory for test I/O files 2016-12-05 16:52:22 +00:00
Peter Stephenson
9649ef5888 40100: ERR_EXIT and ERR_RETURN test for anonymous functions.
Should trigger on non-zero status at end of function even if
behaviour is suppressed by code inside the function at the point
the status is set.
2016-12-05 13:49:45 +00: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
Peter Stephenson
af2ab02472 40088: atttempt to make interactive param test more robust 2016-12-04 19:19:59 +00:00
Barton E. Schaefer
ffed0695c2 unposted: regression test for 40071 2016-12-03 15:02:17 -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
a81f280bfa 40010: builtins: Say 'bad option: +x', not 'bad option: -x', when +x was passed. 2016-11-28 07:16:38 +00:00
Daniel Shahaf
eccb7471b5 39757 plus test: Fix completion under parenthetical directory names, broken in 39412 2016-11-27 15:12:00 +00:00
Oliver Kiddle
07509be51a unposted: add test case for partial completion matching of options with arguments 2016-11-23 11:57:02 +01:00
Oliver Kiddle
ee1222454e unposted: fix printf -v to an array without format string reuse 2016-11-23 11:52:12 +01:00
Oliver Kiddle
85ba685813 39993: Tests for 39981. 2016-11-21 05:40:09 +00:00
Oliver Kiddle
cb5f100bd3 39986, 39989: improve handling of vi-repeat-change
Save previous vi change and throw away a new change that fails.
Add zle -f vichange to allow shell widget to be a single change.
Fix repeat of command where numeric arguments were multiplied.
2016-11-20 23:59:48 +01:00
Peter Stephenson
368884a3aa 39995 (from 39977): Optimise string parameter assignment.
If setter is the standard one and string length is unchnaged we can
copy into place.
2016-11-20 19:41:52 +00:00
Daniel Shahaf
c392e6c620 39915: whence: Honor PATH_DIRS option for arguments that start with './' or '../'.
While here, add some docstrings.
2016-11-17 15:28:42 +00:00
Oliver Kiddle
48bdcd7713 39959: when repeating vi changes advance through the numbered killring registers
Also fix numeric arguments with vi-repeat-change: and argument passed
to the repeat replaces that previously saved with the change.
2016-11-17 12:28:08 +01:00
Oliver Kiddle
7d2f805008 39945: allow further tab presses to move on to menu completion even when compstate[insert] is emptied 2016-11-16 09:42:49 +01: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
e9dbfa8046 39947: Additional test for array subscripts.
This checks out-of-range multiple subscripts with and without
the (@) flag.
2016-11-15 16:01:32 +00:00
Peter Stephenson
5f1700755f 39901: No EXIT trap on LHS of pipeline.
There is a special case if the LHS is a shell construct.
Add unit tests for both cases.
2016-11-10 10:37:27 +00:00
Peter Stephenson
a57977d01a 39870: ensure exit trap can always run 2016-11-08 13:02:57 +00:00
Barton E. Schaefer
dee0bce7b4 unposted: tests for 39839, 39844 2016-11-05 21:37:23 -07:00
Oliver Kiddle
4b41e33cbc 39389: when printf -v is used with an array use separate elements each time the format is reused 2016-11-05 00:27:47 +01:00
Barton E. Schaefer
22e1139328 39824: test case for 39811 (commit ae4c035c) 2016-11-03 12:03:24 -07:00
Peter Stephenson
4073a6655c 39815: Read input to end on parse error in $(...) inside a string.
This allows ${(z)} to output the whole string, although we can't do
word splitting from the error onwards.
2016-11-03 10:30:00 +00:00
Daniel Shahaf
33ceb8b58f 39787: Add a regression test for 39412. 2016-11-01 05:48:55 +00:00
Peter Stephenson
88c42a2ba0 39777: $() is a valid empty command substitution 2016-10-30 17:12:04 +00:00
Barton E. Schaefer
0f5e670cde "typeset -p" uses "export" commands or the "-g" option for parameters that are not local to the current scope 2016-10-24 07:14:39 -07:00
Peter Stephenson
7e7e2d7e63 39678: metafication of printf %q argument and result 2016-10-19 10:39:58 +01:00
Martijn Dekker
31c6cfca9c 39625: case needs to reset lastval if no pattern matched 2016-10-13 10:49:02 +01:00
Oliver Kiddle
9d393f7b7d 39622: add test cases for recent _arguments fixes, exclusion lists and -A/-S 2016-10-13 10:05:18 +02:00
Peter Stephenson
8f2ce89a0c 39599: Don't reset status before "case" execution 2016-10-10 10:55:48 +01:00
Peter Stephenson
ffa6c76253 39578: Test more ERR_RETURN cases with "&&" and functions 2016-10-06 09:48:48 +01:00
Peter Stephenson
bcb52460f3 39571: Fix ERR_EXIT bug with && and function.
"foo && bar" inside a function could cause the code outside
the function not to perform ERR_EXIT or ERR_RETURN when needed.
2016-10-05 17:46:42 +01:00
Peter Stephenson
0854ee56bc 39568: "! <complex-command>" suppresses ERR_EXIT 2016-10-05 13:52:31 +01:00
Peter Stephenson
dc517212ca 39566: Improve usefulness of command_not_found_handler.
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.
2016-10-05 12:14:43 +01:00
Peter Stephenson
36a11804b4 39521: Refactor start of execcmd().
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.
2016-10-03 09:59:01 +01:00
Peter Stephenson
6b2585147b 39540: "! command" should suppress ERR_EXIT and ERR_RETURN 2016-10-02 19:17:19 +01:00