summaryrefslogtreecommitdiff
path: root/Src/builtin.c
AgeCommit message (Collapse)AuthorFilesLines
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.
2019-12-1845066: internal: Document forklevel, locallevel, and exit_pending.Daniel Shahaf1-1/+5
2019-12-1745058: internal: Add symbolic names to possible values of zexit()'s ↵Daniel Shahaf1-11/+13
"from_where" parameter. No functional change.
2019-12-17unposted: Update comment to reflect variable rename in 41012 (= ↵Daniel Shahaf1-1/+1
zsh-5.3.1-182-gd7110d8f0).
2019-12-1245009: POSIX_CD needs to suppress some forms of option.Peter Stephenson1-1/+1
Otherwise forms of argument allowed by POSIX are interpreted as options instead.
2019-12-1145004: Fix typos in commentsMartijn Dekker1-2/+2
2019-10-10unposted: functions -c: Fix typoDaniel Shahaf1-1/+1
2019-08-03Copy functions using functions -c old new.Peter Stephenson1-2/+41
Documentation and test.
2019-07-0844502: Quote function name for "autoload -X"Bart Schaefer1-1/+1
2019-07-0144469: correct error on missing option argumentMartijn Dekker1-5/+12
2019-06-2344443: POSIX allows exporting readonly variablesMartijn Dekker1-1/+1
2019-05-1444284: combination of -T and -p to typeset crashed the shell.Oliver Kiddle1-4/+2
2019-05-1444291: printf with argument specifier out of range for an int crashed the shellOliver Kiddle1-2/+1
2019-04-1244198: Add cd_silent option to suppress all cd outputdana1-2/+2
2018-10-1043669: ensure explicit exit status is used over implicitPeter Stephenson1-2/+2
2018-10-0943660: extend 43653 when final exit is implicit.Peter Stephenson1-2/+38
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-0943656: special tied arrays don't have tieddataPeter Stephenson1-1/+1
2018-10-0943653: explicit exit from EXIT trap overrides exit statusPeter Stephenson1-4/+10
2018-10-0843616: Various parameter setting and display fixes.Peter Stephenson1-43/+112
Mostly to do with typeset -p and tied variables and their interaction. Some general tied variable fixes.
2018-09-10GitHub #28: Add missing math.h include for builtinsJörg Thalheim1-0/+2
math.h is required for isnan/isinf
2018-06-2043077: Fix shift builtin status.Peter Stephenson1-1/+6
If the math evaulation to get the shift count failed the status wasn't passed back from the builtin.
2018-05-1742785: Allow redefining math function to work silently.Peter Stephenson1-9/+4
Previously it failed with an error message that the function was already defined. This is inconsistent with most other aspects of shell usage.
2018-05-1342488: test cases for 42369 and address some issues in the codeOliver Kiddle1-2/+8
2018-04-0742601: tidy up code for set -A/+A to not increment a NULL pointer and to be ↵Oliver Kiddle1-6/+4
more efficient
2018-01-3142332: Special case unsigned printf formats.Peter Stephenson1-1/+4
For constants we can avoid a conversion to signed by examining the expression before passing to math eval.
2017-12-2242156: new CHECK_RUNNING_JOBS option demanded by bash groupiesPeter Stephenson1-1/+2
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-0142063: getopts errors now report "+" in front of option where appropriatedana1-2/+3
2017-11-0241866: No error unsetting nonexistent function for POSIXBUILTINSMartijn Dekker1-1/+5
2017-10-01Add typeset -p1, like typeset -p with newlinesPeter Stephenson1-7/+20
2017-09-13First go at var=([key]=value) syntax.Peter Stephenson1-22/+48
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-1141668: New --emulate option on invocation.Peter Stephenson1-1/+1
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-06-1341284: Fix NULL dereference in cd.Peter Stephenson1-1/+10
This happened in sh compatiblity mode if HOME was not set and cd was used with no argument.
2017-06-1241244: Add zmodload -s option.Peter Stephenson1-1/+1
Doesn't complain if module is unavailable, but prints more obscure errors. Use existing low-level silent flag by passing through intermediate module loading hierarchy.
2017-04-2741012: Fix premature exit from nested function in EXIT trap.Peter Stephenson1-7/+16
Also add check so we don't delay an exit if we were already in an EXIT trap for the main shell, as we should in that case leave immediately.
2017-03-0140622 with typos fixed: functions -Ms.Peter Stephenson1-3/+20
This adds the capability for mathematical functions based on shell functions to have a string argument. Module functions have had this for a long time.
2017-02-1340536: Prepend directory to $fpath.Peter Stephenson1-0/+36
Used if parent function is autoloaded by absolute path so as to find functions in the same suite without shell code modification.
2017-01-2940453: signal handler safety for callers of patcompile(PAT_STATIC), which is ↵Barton E. Schaefer1-17/+20
not re-entrant.
2017-01-2440404: Only quote command in whence output with -v.Peter Stephenson1-4/+8
2017-01-2340391: Add WARN_NESTED_VAR option and functions -W.Peter Stephenson1-4/+8
These are companions to WARN_CREATED_GLOBAL, warning when a variable from an enclosing scope is altered.
2017-01-1840375: autoload with explicit path mustn't trash already loaded function.Peter Stephenson1-0/+25
Also remove unnecessary dupstring() on already duplicated string when expanding =cmd.
2017-01-1740369: code should have been committed with 0a2d92f98Peter Stephenson1-2/+2
2017-01-1240342: Add directory name cache for autoload file paths.Peter Stephenson1-6/+6
This renders "autoload /blah/blah/*" as efficient as use of fpath.
2017-01-1240335: More care with autoload function path.Peter Stephenson1-3/+8
If doing "autoload -X", the path present might actually be location of file containing the function with the autoload -X. Add an explicit flag to say it's a directory for autoload.
2017-01-11unposted: more care with shell function filename.Peter Stephenson1-1/+3
When updating shfunc structure to change filename we should be careful to free whatever's there already, we may now be the directory in which to find the function definition. After loading the field contains the full name of the file.
2017-01-11Add features associated with autoloading a function using an absolutePeter Stephenson1-44/+129
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.
2016-12-1440179: fix handling of "printf -" and "printf --"Barton E. Schaefer1-1/+1
unposted: regression test for 40179 / 37467
2016-12-1040134: silence spurious compiler warnings.Barton E. Schaefer1-1/+1
2016-11-2840010: builtins: Say 'bad option: +x', not 'bad option: -x', when +x was passed.Daniel Shahaf1-2/+3
2016-11-23unposted: fix printf -v to an array without format string reuseOliver Kiddle1-1/+1