summaryrefslogtreecommitdiff
path: root/Src/init.c
AgeCommit message (Collapse)AuthorFilesLines
2025-03-0353399: don't load ZLE early to set keymapOliver Kiddle1-23/+7
When zsh is run with -o vi / -o emacs, instead of loading ZLE to force the change, only record the option state. Then when ZLE starts, the vi option determines the default keymap.
2025-01-27github #126: Fix some typosWu, Zhenyu1-1/+1
2024-12-2653257: use monotonic clock where appropriatedana1-4/+3
update the following features to use the monotonic clock for calculating time deltas and intervals: * MAILCHECK parameter * PERIOD parameter * SECONDS parameter * %(nS.t.f) prompt-expansion sequence * time built-in's elapsed time and cpu % values * zsh/zftp ZFTP_TMOUT parameter * zsh/zprof timings also use CLOCK_MONOTONIC_RAW instead of CLOCK_MONOTONIC on macOS
2024-09-1853092: silence deprecated header warning on older Linux systemsOliver Kiddle1-1/+1
2024-09-1453085: support for BSDs in $ZSH_EXEPATH implementationOliver Kiddle1-8/+26
2024-09-1453081: remove old BeOS support codeOliver Kiddle1-6/+2
2024-09-1453080: remove code for systems that only have the old pre-POSIX signal()Oliver Kiddle1-8/+4
2024-07-2852999: import OLDPWD from environment if setPeter Stephenson1-1/+5
2024-02-2852594: support for POSIX real-time signals with kill and trapOliver Kiddle1-0/+3
Also add new -L option to kill for a more verbose listing of signals
2024-02-1845837: fix process group restoration upon exitStephane Chazelas1-5/+8
2023-10-0152193: handle UTF8-encoded USERNAME and therefore home directory in zcompileBart Schaefer1-2/+2
Includes one unposted thinko fix ztrdup -> dupstring
2023-04-1151639: new parameter ZSH_EXEPATH (full path of zsh executable)Jun-ichi Takimoto1-1/+116
The full pathname is obatined by a reliable method on macOS and systems that support procfs. But on other systems (FreeBSD, OpenBSD, ...) it is guessed from argv[0], PWD and PATH.
2023-04-0951631: initialize $_ by copying it from environmentJun-ichi Takimoto1-3/+6
2023-01-1051280: add support for italic and faint fonts in the line editorOliver Kiddle1-1/+18
2023-01-1051258, 51272: refactor handling of terminal attributes, removing OFF flags ↵Oliver Kiddle1-2/+1
in zattr
2022-12-1651212: remove STOUC() macroOliver Kiddle1-5/+5
This served as a workaround for ancient compilers where casts to unsigned char were broken.
2021-11-0249534, 49539: separate watch/log functionality out into a moduleOliver Kiddle1-1/+0
2021-08-2749290: Replace stdio for buffered shell input.Peter Stephenson1-8/+6
The previous method allowed memory management to interact with signal handlers, causing occasional crashes on some system. Instead, use a simple pre-allocated buffer and raw system calls.
2020-04-0945660: Fix crash setting vi or emacs mode on command line.Peter Stephenson1-7/+23
Delay setting the option until the module system is set up.
2020-01-26unposted: internal: Add some comments and fix indentation. No functional ↵Daniel Shahaf1-2/+13
change.
2019-12-1745058: internal: Add symbolic names to possible values of zexit()'s ↵Daniel Shahaf1-5/+5
"from_where" parameter. No functional change.
2019-12-1145004: Fix typos in commentsMartijn Dekker1-3/+3
2019-05-2044307: allow for atoi() returning a negative numberOliver Kiddle1-1/+4
2019-04-2544284: Mark SIGQUIT as ignore if ignored on entry to shell.Peter Stephenson1-0/+9
This prevents us from re-enabling it after a fork if it is being ignored.
2018-11-0543747: new module to map colours from hex triplets to the nearest matching ↵Oliver Kiddle1-0/+1
colour
2018-10-1043669: ensure explicit exit status is used over implicitPeter Stephenson1-1/+1
2018-10-0943660: extend 43653 when final exit is implicit.Peter Stephenson1-4/+4
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-07-3143219 (except term{cap,info}.c): fix several memory leaksJun-ichi Takimoto1-1/+2
2017-09-1141668: New --emulate option on invocation.Peter Stephenson1-34/+98
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-08-2441590 modified as 41595: make ERR_RETURN more logical.Peter Stephenson1-2/+2
It now operates separately at each function depth. To keep ERR_EXIT global, make the noerrexit variable usd bit flags. Extend tests.
2017-04-1540977: "emulate" disallows "--help" and "--version"Barton E. Schaefer1-2/+2
2017-03-0840745 + 40753: Fix 'unset ZLE_RPROMPT_INDENT' not restoring the default ↵Daniel Shahaf1-1/+1
behaviour. To reproduce: RPS1=foo ZLE_RPROMPT_INDENT=42 unset ZLE_RPROMPT_INDENT
2016-10-0339545: Add some missing unqueue_signals().Peter Stephenson1-1/+3
All of these are added simply to fit existing logic in other branches.
2016-09-0539167: Make $ENV handling more like POSIXTeubel György1-11/+14
2016-03-0638086: shuffle init code to localize a global, add $ZSH_ARGZERO, refine ↵Greg Klanderman1-5/+8
$ZSH_SCRIPT (also a couple of ChangeLog typos corrected -- Bart)
2015-12-04unposted: fix init_io() calls in previous changePeter Stephenson1-0/+2
2015-12-0437294: Add ZSH_EXECUTION_STRING.Peter Stephenson1-13/+15
This shows the argument to shell option -c.
2015-11-2037161: Disable the heuristic setting RPROMPT_INDENT to 0Mikael Magnusson1-2/+4
2015-08-1136090: keep signals queued for preprompt()Barton E. Schaefer1-2/+0
2015-08-0936022 fix bug that some loop constructs could not be interrupted, revise ↵Barton E. Schaefer1-0/+5
signal queueing There are two underlying ideas here: (1) Keeping signals queued around anything that's doing memory management (including push/pop of the heap) has become crucial. (2) Anytime the shell is going to run a command, be it buitin or external, it must be both safe and necessary to process any queued signals, so that the apparent order of signal arrival and command execution is preserved.
2015-07-2235826: add getsparam_u() to return unmetafied string, use it for a number of ↵Barton E. Schaefer1-1/+1
references to non-special params
2015-06-1635482: be consistent about how argzero is allocatedBarton E. Schaefer1-2/+3
2015-04-2534961: replace a couple of free() with zfree() for consistencyBarton E. Schaefer1-1/+1
2015-01-1834322: bug with interface to parsestr() etc.Peter Stephenson1-4/+7
Was showing up in places like ${(e)...} where command substitution could reallocate the token string, but actually there was never any guarantee that the lexer wouldn't do that, so this was always a bit iffy.
2015-01-09Rearrange context saving.Peter Stephenson1-2/+2
Variables are now associated with the module that declares them, being initialised and saved/restored there. However, as many variables are used for communication between modules, many of them are set in multiple places, so the assignment is ambiguous.
2015-01-08Fix command substitutions to parse contents as they are read in.Peter Stephenson1-1/+2
Do this by refactoring misnamed lexsave()/lexrestore() to allow continuity of history and input. Add test.
2014-12-1133876: etc.: Separate errors and keyboards interruptsPeter Stephenson1-4/+25
Combination of 12 commits from interrupt_abort branch. Basic strategy is to introduce bits to errflag and to set and reset them separately. Remove interrupt status on return to main keymap. Turn off ERRFLAG_INT for always block. Restore bit thereafter: we probably need a new variable in order to allow user interrupts to be reset in the always block. Add TRY_BLOCK_INTERRUPT This works the same as TRY_BLOCK_ERROR, but for a SIGINT, too. Ensure propagation of SIGINT from exited job. If received by foreground job, shell uses ERRFLAG_INT, not ERRFLAG_ERROR, to set the new state. Reset errflag before precmd() Add always block in _main_completion to fix ZLS_COLORS Ensures we get the right state of $ZLS_COLORS at the end of _main_complete even if there's an interrupt. However, the "right state" is a bit messy as it depends on styles.
2014-10-2633531 with additions: retain status of exited background jobs.Peter Stephenson1-1/+0
Add linked list of unwaited-for background jobs. Truncate at value of _SC_CHILD_MAX discarding oldest. Remove old lastpid_status mechanism for latest exited process only. Slightly tighten safety of permanently allocated linked lists so that this doesn't compromise signal handling.
2014-10-1233445: fix handling of -s when combined with -i at shell invocationBarton E. Schaefer1-4/+16
Fixes a long-standing (25+ years) bug where using -i -s together did have the documented effect of disabling command line script files but also had the side-effect of invoking ZLE, thereby ignoring the redirected input.
2014-09-2933268: interactive shells treat SIGPIPE like SIGHUP if and only if SHTTY is ↵Barton E. Schaefer1-0/+1
disconnected