summaryrefslogtreecommitdiff
path: root/Src/builtin.c
AgeCommit message (Collapse)AuthorFilesLines
2025-02-1253348: Revise handling of incompatible typeset options when used with -nBart Schaefer1-3/+12
2025-01-3053332, 53334: Avoid strlen calls after sprintfOliver Kiddle1-2/+1
2024-06-1352951: make sure to close memstream for 'print -v'Jun-ichi Takimoto1-3/+2
2024-03-1252742: fix bad interactions of "typeset -p" with GLOBAL_EXPORTBart Schaefer1-8/+27
2024-03-0552692: local typeset of the name of a named reference hides the referenceBart Schaefer1-7/+8
2024-03-04unposted (cf. 52615): use META_NOALLOC for 52591Bart Schaefer1-5/+5
2024-03-0452659: Fix crash on unset-through-nameref, add regression testBart Schaefer1-2/+4
2024-03-0452650 plus minor fixes: add -u for named references pointing to "upper" scopeBart Schaefer1-1/+1
2024-03-0152645: unset through a nameref keep up-scope parameters declared unsetBart Schaefer1-0/+6
Othewise unset of a reference to a global wipes out all parameters of the same name.
2024-02-2852594: support for POSIX real-time signals with kill and trapOliver Kiddle1-15/+15
Also add new -L option to kill for a more verbose listing of signals
2024-02-2452591: printf builtin must pass metafied strings to math evaluationStephane Chazelas1-4/+6
2024-02-1752556: fix crash when changing type of unset referent via named referenceBart Schaefer1-2/+4
2024-01-2452468: save and restore state of correct TTY when using read -s / -dBart Schaefer1-15/+15
2023-10-2652244: Fix a batch of minor defects reported by Coverity.Bart Schaefer1-1/+3
Coverity defects 1547831, 1547826 (remove unused function), 1521551, 1500752, 1500747, 1401549, 1372423, 1270645, 1255799, 1255792, 1255789, 1255787, 1255782, 1255750
2023-07-2651945: assorted documentation improvements, bug fixes, and new testBart Schaefer1-9/+32
1) Document the behavior of "typeset -n existing_var" (via Jun T. comment) 2) Prohibit "typeset -nm pattern" because, well, it's insane. Add test. 3) Improve doc for ${(!)ref} including ${{t!)ref} (Jun T.) 4) Fix doc for how-to unset of a named ref (Jun T.) 5) Allow "typeset +r -n ref" and "typeset +r +n ref" (Jun T.) 6) Fix "typeset -r -n ref=param" to create readonly references 7) Avoid accidental removal of PM_UNSET flag (Jun T.) and update test 8) Fix "typeset -gn ref=value" and add a test for it 9) Add tests for read-only reference behavior 10) Fix infinite recursion when resolving scope of an unset local named reference, add test.
2023-07-2651969: read -d and -s should not reset terminal state when stdin is redirectedBart Schaefer1-3/+3
2023-07-0951890: fix "whence -wa" for multiple argumentsBart Schaefer1-0/+1
2023-03-2258586: print "%s" with invalid multibyte characterPeter Stephenson1-13/+14
Treat each byte that is invalid or part of an incopmlete set as a single byte.
2023-03-1451573: additional "typset -p -m" fix for namespacesBart Schaefer1-3/+5
The "-m pattern" option is supposed to enable printing namespaces, but that didn't work when combined with -p. The -p option could also cause an unset parameter to become set if a named reference pointed at it.
2023-03-0651510: Skip namespaces in "set"/"typeset" output, add tests, fix bugBart Schaefer1-4/+10
2023-02-2051431: "typeset -p" shouldn't change parameter flagsBart Schaefer1-13/+33
2023-02-1351430: Misc. problems with typeset and $parametersBart Schaefer1-6/+10
* Fix and test for regression of assignment when using typeset command * Fix output of typeset +m and $parameters[ref] * Prevent segfault in typeset
2023-02-1251402: Some ksh/bash features, additional sanity checkingBart Schaefer1-12/+37
* Add "unset -n" * Allow and enforce "typeset -n -r" for read-only references * "can't change type via subscript reference" error * Better checking for self-referential declarations/assignments * Ksh-style "foo=bar; typeset -n foo" creates foo=bar reference * Support "typeset -n ref; for ref in ..." * Subscripted references use NO_EXEC for safety * References assigned in called scopes reset scope at end * Allow named references to $! $? $$ $- $0 $_
2023-02-1251360: Initial implementation of named references.Bart Schaefer1-4/+52
2023-01-1051258, 51272: refactor handling of terminal attributes, removing OFF flags ↵Oliver Kiddle1-1/+3
in zattr
2022-12-1751214: handle read -d and a delimiter that can't be decoded into a characterOliver Kiddle1-2/+5
Terminate input at the raw byte value of the delimiter. Also document and test the use of an empty string as a way to specify NUL as the delimiter.
2022-12-1751207: fix for read -d when the delimiter is a byte >= 0x80Jun-ichi Takimoto1-3/+4
2022-12-1651212: remove STOUC() macroOliver Kiddle1-10/+10
This served as a workaround for ancient compilers where casts to unsigned char were broken.
2022-06-0950359: fix bad sticky-emulation in "functions -c"Matthew Martin1-1/+1
2022-06-0950351: "functions -c" can set signal trapsBart Schaefer1-1/+16
2022-04-3050149: Remove all remaining =(...) files at shell exitBart Schaefer1-0/+1
2022-04-1450068: 'exit' in trap causes calling function to returnBart Schaefer1-0/+2
2021-11-0249534, 49539: separate watch/log functionality out into a moduleOliver Kiddle1-1/+0
2021-09-08unposted: add/remove UNUSED() for some function parametersJun-ichi Takimoto1-1/+1
2021-06-1349069: literal interpretation of subscripts for unset of array/hash elementsBart Schaefer1-4/+2
2021-05-1648857: declare "volatile" all globals that may be modified by signal handlersBart Schaefer1-9/+7
2021-05-15users/26742: break out of surrounding shell loops when exit is called from ↵Peter Stephenson1-1/+4
an exit hook
2021-05-0348614: getopts: Calculate OPTIND according to POSIX_BUILTINSdana1-0/+10
2021-04-1847704: POSIX export and readonly ignore "-p" when parameter names also appearBart Schaefer1-2/+6
2021-04-1848560: add TYPESET_TO_UNSET option to remove initialization of parametersBart Schaefer1-3/+11
Changes typeset such that ${newparam-notset} yields "notset" and "typeset -p newparam" does not show an assignment to the parameter. This is similar to the default behavior of bash and ksh, with minor differences in typeset output. Also add tests for some POSIX incompatibilities plus minor changes for test harness robustness.
2021-02-18users/26509: fix for r -LPeter Stephenson1-2/+3
fc with the -L option should ignore remote entires, rather than reading them and treating them as an error.
2021-02-1748073: Add fc -s as POSIX way of rerunning command without starting editorMartijn Dekker1-2/+2
2021-02-0447895: Remove trailing spaces from "print -ac" output lines.Bart Schaefer1-1/+1
2020-10-2547301: Fix print -v metaficationJun-ichi Takimoto1-1/+1
2020-07-0346168: Update $PWD and call chpwd hook after normalizing pathMatthew Martin1-18/+17
2020-06-05typeset: Fix leaving corrupted entries in paramtabMikael Magnusson1-3/+9
2020-05-0345729: internal: Add a second parameter to zlinklist2array(), analogously to ↵Daniel Shahaf1-5/+5
hlinklist2array(). Will be used in the next commit.
2020-04-0945660: Fix crash setting vi or emacs mode on command line.Peter Stephenson1-1/+1
Delay setting the option until the module system is set up.
2020-02-2445487: Missing mod_export declarations for AIXPeter Stephenson1-1/+1
2020-01-1545302: bin_umask(): Queue signals around umask().Daniel Shahaf1-1/+4
Otherwise, a signal handler might create files while the temporary umask is in effect.