1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-06-25 23:51:01 +02:00
Commit graph

176 commits

Author SHA1 Message Date
Bart Schaefer
4fb96cc639 52612: %l replacment of zwarning() does literal string output 2024-03-02 09:22:43 -08:00
Bart Schaefer
c039a74e09 Typos in previous commit comments 2024-02-03 19:55:41 -08:00
Bart Schaefer
ce8909b494 unposted: Record as comments some notes about namespace usage exceptions. 2024-02-03 19:52:39 -08:00
Bart Schaefer
4da0f689c4 unposted: Fix longstanding typo in comment 2023-12-09 19:48:48 -08:00
Bart Schaefer
1ffc6d0ef5 52204: fix thinko, unmeta() buffer should not be freed 2023-10-05 07:58:27 -07:00
Bart Schaefer
29644f12e7 52193: handle UTF8-encoded USERNAME and therefore home directory in zcompile
Includes one unposted thinko fix ztrdup -> dupstring
2023-10-01 11:34:33 -07:00
Peter Stephenson
21baad1037 51307: Improve error on attempt to define function from aliased name 2023-02-02 10:09:21 +00:00
Oliver Kiddle
a73c705b0c 51212: remove STOUC() macro
This served as a workaround for ancient compilers where casts to
unsigned char were broken.
2022-12-16 23:28:10 +01:00
Bart Schaefer
5b1c204c54 Unposted: Fix typo in comment 2022-10-23 16:28:14 -07:00
Bart Schaefer
734740a5ed 50341: disallow here-document markers containing newline 2022-06-08 20:48:42 -07:00
Peter Stephenson
0b3b259794 49433: Don't assume EPROG references are bounded by function depth.
We use references for efficient function copy, so there is no useful limit any more.
2021-10-05 16:45:55 +01:00
Marlon Richert
a675d058db 49378: skip check for collision of aliases and functions when NO_EXEC 2021-09-06 14:16:18 -07:00
Peter Stephenson
daa208e907 49269: Fix "[ ! -o ]".
This should detect "-o" as non-empty string; "-a" was alrady working.
Update the test.
2021-08-10 09:19:32 +01:00
Daniel Shahaf
d4da2c73f0 47300: Document the EC_NODUP, EC_DUP, EC_DUPTOK triplet.
All uses reviewed; no functional change.
2020-08-08 06:01:32 +00:00
Mikael Magnusson
8923d2a618 Add SHORT_REPEAT option 2020-04-02 07:42:16 +02:00
Daniel Shahaf
aed0cb4408 45583/0009: Add end-of-options guard support to 'function -T'. 2020-03-22 02:23:53 +00:00
Daniel Shahaf
386d9ac8ff 45583/0008: Add the 'function -T' syntax.
Config/version.mk was bumped in the previous commit.
2020-03-22 02:23:53 +00:00
Daniel Shahaf
a3c6c5513d 45583/0007: WC_FUNCDEF: Add a placeholder element. 2020-03-22 02:23:53 +00:00
Daniel Shahaf
fd1ef7d770 45583/0006: internal: Add some comments for orientation. No functional change. 2020-03-22 02:23:53 +00:00
Daniel Shahaf
e37df255c1 45583/0005: internal: Document the WC_FUNCDEF data layout for anonymous functions with arguments (follow-up to 29492) 2020-03-22 02:23:52 +00:00
Daniel Shahaf
338a4a299a 45583/0004: internal: Add some comments around wordcodes. No functional change. 2020-03-22 02:23:52 +00:00
Daniel Shahaf
4960699de2 45583/0003: internal: Add some comments around Eccstr. No functional change. 2020-03-22 02:23:52 +00:00
Daniel Shahaf
be73026b07 45583/0002: internal: Reduce some variables' visibility. No functional change. 2020-03-22 02:23:52 +00:00
Martijn Dekker
c578f0a08b 45004: Fix typos in comments 2019-12-11 02:37:39 +00:00
Peter Stephenson
4384fdc7f0 44446: Fix here document with file descriptor declarator.
Add unit test.
2019-06-24 20:19:19 +01:00
Peter Stephenson
30e356eb1a 44296: "typeset Q= {X}" crashed the shell. 2019-05-14 12:10:10 +01:00
Kamil Dudka
00e6ab70b8 44122: turn int into long to avoid overflow 2019-03-14 09:46:23 +00:00
Peter Stephenson
11f18457d2 Allow short loops with "while" 2018-04-23 13:45:08 +01:00
Martijn Dekker
54ea6a8cd5 42365: Use .zwc file if timestamp identical to source.
This can happen if the files are bundled together.
2018-03-05 09:31:11 +00:00
Peter Stephenson
97c74dcb0e 42110: Fix redirections between variable assignments at start of line 2017-12-12 09:13:41 +00: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
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
cfd34c75ac 41504: make empty strings work in case patterns with no leading parenthesis 2017-08-09 19:57:47 +01:00
Sebastian Gniazdowski
b31f947795 41402: Delay has_tokens() in ecstrcode as may not be needed 2017-07-09 17:38:01 +01:00
Sebastian Gniazdowski
e556f9c78d 41402: Add hasher to ecstrcode to reduce string comparisons 2017-07-09 17:34:55 +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
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
Barton E. Schaefer
e51c9c17af 40453: signal handler safety for callers of patcompile(PAT_STATIC), which is not re-entrant. 2017-01-29 08:30:14 -08:00
Peter Stephenson
f26d1ba6b0 Add features associated with autoloading a function using an absolute
path.

-d defaults to normal fpath

-r remembers the path without actually loading.  May be combined with -d.

-R does the same but it's an error if not found

-X can now take a directory path: this is used to output not yet loaded
functions that have an associated path.
2017-01-11 11:26:13 +00:00
Peter Stephenson
bb218704d2 40306 with doc tweaks: Change behaviour expanding alias in () function definition.
Now an error unless the () is part of the same error as the name.
Add ALIAS_FUNC_DEF option to allow it again.
2017-01-10 19:14:26 +00:00
Peter Stephenson
88c42a2ba0 39777: $() is a valid empty command substitution 2016-10-30 17:12:04 +00:00
Oliver Kiddle
fbafc5b509 39332: support ksh's [[ -v varname ]] condition for checking if variables are set 2016-09-16 00:00:28 +02:00
Oliver Kiddle
00708285e9 unposted: remove duplicated assignment 2016-09-15 23:56:06 +02:00
Peter Stephenson
1993a3cd2a 39292: Distinguish "=" and "==" tests in output.
This is both in xtrace output and shell code rebuilt from
internal structures.
2016-09-13 09:42:24 +01:00
Peter Stephenson
28c46c1bfb 38111: Remove redundant return values in parsing.
Return values from par_list() and par_list1() are no longer used.
2016-03-07 10:49:35 +00:00
Barton E. Schaefer
bc958ab275 38106: if...then if...else should be a parse error. 2016-03-06 15:10:27 -08:00
Daniel Shahaf
bced1beb8c 37700: Teach ${(z)} the 'repeat WORD SUBLIST' syntax. 2016-01-29 09:14:53 +00:00
Barton E. Schaefer
62706b1abc 37469: do NOT allow semicolons in place of line breaks in conditionals 2015-12-31 14:16:56 -08:00