1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-09-25 05:27:12 +02:00
Commit Graph

3721 Commits

Author SHA1 Message Date
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
Daniel Shahaf
a9e60dc179 users/13148 (and workers/42060): Abort the command line when replying
"[n] No" to the RM_STAR_SILENT prompt.

Patch by Stephane, rebased by Mikael.
2017-12-20 04:13:01 +00:00
Jun-ichi Takimoto
dae5d1d5ba 42412: fix a bug in 42116
Also fix a few widgets which were calling wrong function when negative
numeric argument was given.
2017-12-18 23:49:31 +09:00
Jun-ichi Takimoto
5f33a93afb 42116: multibyte support for ZLE vi-mode word motion 2017-12-18 12:48:25 +09:00
Peter Stephenson
aab0f6d763 42123 (tweaked): take account of Dash in function names.
Needed when comparing word code function name with autoload request.

Add test.
2017-12-15 09:00:37 +00:00
dana
cb04ae40af add millisecond and microsecond options to TIMEFMT variable 2017-12-14 15:36:46 +00:00
Peter Stephenson
97c74dcb0e 42110: Fix redirections between variable assignments at start of line 2017-12-12 09:13:41 +00:00
dana
755f8571d4 42063: getopts errors now report "+" in front of option where appropriate 2017-12-01 09:19:13 +00:00
Daniel Shahaf
77a39b57bf 42031 + 42048: Make [[ -o invalidoption ]] a normal(ish) false value, rather than a syntax error. 2017-11-24 22:10:27 +00:00
Dima Kogan
487489c522 stat() for glob qualifiers lost information in corner case 2017-11-20 09:59:51 +00:00
Oliver Kiddle
1bfcff129d 41983: fix exclusion of long options with (-) on a normal argument 2017-11-04 00:57:48 +01:00
Martijn Dekker
bf04ffb542 41866: No error unsetting nonexistent function for POSIXBUILTINS 2017-11-02 20:03:45 +00:00
Barton E. Schaefer
dcd4f02845 41902: ${(z)...} continues parsing on unmatched quote when CSH_JUNKIE_QUOTES is set
Tests for 41902 and 41873
2017-10-17 20:29:47 -07:00
Barton E. Schaefer
1fb6939b94 41873: temporarily disable effects of ${(Z:n:)...} for parsing $(...) within the parameter value
Also fix minor typo in commit b3fa5c52 ChangeLog.
2017-10-13 13:50:18 -07:00
Peter Stephenson
b3fa5c528c 41877: Separate out SH_FILE_EXPANSION loop from parameter substitution.
Parameter substitution can add nodes that need to be rescanned by
it, but not by file expansion, so the two don't play well together.
2017-10-13 18:17:09 +01:00
Oliver Kiddle
233c0e8903 41835: handle multibyte characters with compset -p and -s 2017-10-11 01:23:42 +02:00
Barton E. Schaefer
b84d69cf52 41828, 41830: skip SHFILEEXPANSION for new nodes added by stringsubst() in prefork() 2017-10-08 18:08:09 -07:00
Oliver Kiddle
12902206b7 41824: fix to not complete rest args from an _arguments set alongside the argument to and option in a separate set 2017-10-07 22:35:59 +02:00
Peter Stephenson
e573857a03 41802 (minor tweaks): use heap during shell function call.
Replaces stack for more efficient memory management.

Also fix debug message when FUNCNEST is increased.
2017-10-04 09:18:51 +01:00
Peter Stephenson
174e560a23 41787 (plus minor tweaks): use $FUNCSTACK for function nesting depth.
Initialised from existing configuration value.
2017-10-02 09:44:26 +01:00
Peter Stephenson
728f2adfc8 Add typeset -p1, like typeset -p with newlines 2017-10-01 17:53:56 +01:00
Peter Stephenson
a1276c88e1 41789: Don't save fd if -1.
We try to move an fd which isn't opend but it will feel.
This needs handling specially in the new code for marking
saved fd's.
2017-09-29 16:29:49 +01:00
Oliver Kiddle
80a02c10aa 41772: fix bug in handling of long options with _arguments' -A option 2017-09-28 09:31:35 +02:00
Barton E. Schaefer
7a0718796a 41767: preserve nonzero exit status on interrupt 2017-09-27 20:34:11 -07:00
Peter Stephenson
6230e82d44 41764 (test tweaked): allow [key]+=value when modifying arrays 2017-09-27 09:41:50 +01:00
Peter Stephenson
03af5fdbee 41761: Ensure status from interrupt is propagated by builtin 2017-09-26 09:26:57 +01:00
Peter Stephenson
7d4b41b52a 41747: Don't create hash entry if just checking existence.
Pass a flag in indicating this case.
2017-09-25 20:03:05 +01:00
Peter Stephenson
85b0dd7133 Updates for ksh array element syntax.
Move detection of key/value pairs down into prefork().

Detect normal array assignment and [key]=val array assignemnt
separately.  Mark key / value pairs with Marker and pass up flag.  Deal
with marked triads specially later on.
2017-09-24 17:33:07 +01: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
Barton E. Schaefer
d1914c5af4 41736: NO_INTERACTIVE_COMMENTS in $(...) 2017-09-20 10:17:59 -07:00
Barton E. Schaefer
d29ad85533 41723: one more case of 41627 in "while" loops. 2017-09-18 08:40:02 -07:00
Peter Stephenson
ab7be4238c More [key]=value tweaks
Some rephrasings.

Update typeset -p for associative arrays to use new syntax.
2017-09-14 21:43:37 +01:00
Peter Stephenson
54b3958440 First go at var=([key]=value) syntax.
Works for both normal and typeset case, also var+=...

Still to do: allow to be mixed with straight array assignment,
improve typeset -p, implement [key]+=value.
2017-09-13 20:54:00 +01:00
Peter Stephenson
da4146bdff 41688: builtin wait for all jobs should ignore STAT_NOPRINT 2017-09-13 10:49:06 +01:00
Daniel Shahaf
ed7497e379 unposted: internal: Document zreaddir(). 2017-09-11 15:06:08 +00:00
Thierry Ghelew
9f2271168d 41666: zpty compatibility for OpenBSD 2017-09-11 10:15:15 +01:00
Peter Stephenson
2ef3dff65a 41668: New --emulate option on invocation.
This sets the shell emulation mode similarly to ARGV0=... which
doesn't work from other shells.

Note that this gives more comprehensive emulation than running
emulate within the shell.
2017-09-11 10:12:17 +01:00
Peter Stephenson
c9df6bc8d4 41662: exec -a arguments weren't sanitised 2017-09-10 18:02:52 +01:00
Peter Stephenson
e44600d9aa 41661: Need to remove tokens before using bufferwords() for (z) 2017-09-10 18:01:39 +01:00
Peter Stephenson
ea5b38935a 41641: Some math operations shouldn't be lvalues.
This includes pre- and post- increment and decrement.  Simply
mark all values after operations as rvalues.
2017-09-05 13:15:30 +01:00
Peter Stephenson
5a8155f7b7 41633: Fix problem backgrounding function definitions.
Owing to being marked as simple sublists the instruction to
background was ignored.  This applied to anonymous functions.
2017-09-04 21:36:46 +01:00
Peter Stephenson
ebcea98eca Fix problem with ERR_RETURN.
It wasn't suppressed properly in the code following an if
in some circumstances, in particular in initialsation scripts
and also in a nested function where the caller had suppressed
it.
2017-08-31 16:54:19 +01:00
Peter Stephenson
7d1877da4e 41608 (plus tests): restore ERR_EXIT before function.
There was an exception to the usual ERR_EXIT pattern that causes
problems when executing a function in an else branch.  It seems
the exception is no longer needed as the regression tests pass
without it.
2017-08-29 19:52:18 +01:00
Peter Stephenson
97d4bdbc7e 41590 modified as 41595: make ERR_RETURN more logical.
It now operates separately at each function depth.

To keep ERR_EXIT global, make the noerrexit variable usd bit flags.

Extend tests.
2017-08-24 19:46:20 +01:00
Peter Stephenson
ddb8675901 posted but has not shown up: fix fd problem in subshell.
Record fd's that have been saved in fdtable and if the shell
forks close them as they will never be restored.
2017-08-15 20:49:23 +01:00
Peter Stephenson
74aff4106a 41542: Fix pcre logic for extracting matched parentheses.
When we went off the end of the array but measured the length
implicitly, we got lucky before.  After 41308 we were looking up lengths
in stale memory.

Rename some variables, clean up the logic, be easier to understand.

Add tests.
2017-08-14 11:17:48 +01:00
Phil Pennock
b5f40f4156 41527 (tweaked for heap memory): fix [[ -<cond> ]] from modules 2017-08-11 15:02:06 +01:00
Peter Stephenson
cfd34c75ac 41504: make empty strings work in case patterns with no leading parenthesis 2017-08-09 19:57:47 +01:00