summaryrefslogtreecommitdiff
path: root/Src/hist.c
AgeCommit message (Collapse)AuthorFilesLines
2025-04-1553454: fix interrupt handling in savehistfile()Bart Schaefer1-5/+8
2025-01-3053335: Remove unused dupstring_glen() functionOliver Kiddle1-3/+2
Also make use of the dupstring_wlen() variant in more places to avoid a strlen()
2024-12-2653257: use monotonic clock where appropriatedana1-3/+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-03-1852750: remove ansi2knr support for old pre-ansi K&R compilersOliver Kiddle1-7/+7
2023-10-2652244: Fix a batch of minor defects reported by Coverity.Bart Schaefer1-5/+10
Coverity defects 1547831, 1547826 (remove unused function), 1521551, 1500752, 1500747, 1401549, 1372423, 1270645, 1255799, 1255792, 1255789, 1255787, 1255782, 1255750
2023-06-0851826: correctly read metafied null character from history fileJun-ichi Takimoto1-2/+8
2023-06-0651816: add :S history modifier with pattern matchPeter Stephenson1-5/+12
2023-05-2551739: detect invalid history word beginningPeter Stephenson1-1/+6
2022-12-1651212: remove STOUC() macroOliver Kiddle1-3/+3
This served as a workaround for ancient compilers where casts to unsigned char were broken.
2022-04-2050080: add missing STOUC() in casemodify()Jun-ichi Takimoto1-2/+2
2022-04-0449990: casemodify() avoids metafying characters that it otherwise did not touchBart Schaefer1-5/+14
2021-11-2849601: don't create ambiguous history file entries for lines ending with a ↵Oliver Kiddle1-8/+11
backslash
2021-11-2249586: fix :a and :A modifiers (with PWD="/") on Cygwin⁩Jun-ichi Takimoto1-1/+5
2021-07-2349182: Turn off correction inside command substition.Peter Stephenson1-0/+7
In "A=$(PWD)" we dont't have the information to correct at the level of the PWD subcommand, so don't try to do it as this causes a crash.
2021-04-1148504: use SEEK_ macros in fseek() callsOliver Kiddle1-2/+2
2021-04-1145396: readhistfile: avoid thousands of lseek(2) syscalls via ftell()Michael Stapelberg1-6/+10
2020-03-2545583/0003: chrealpath: Let caller decide how the return value should be ↵Daniel Shahaf1-4/+7
allocated.
2020-03-2545583/0002: chrealpath: Make symlink resolution optional.Daniel Shahaf1-5/+16
2019-12-3124581: Fix array assignments in shell word splitting and completion.Peter Stephenson1-0/+10
Assignments after the first were not recognised as such as without the full parser the state didn't return to command position. Fix this in bufferwords() and the completion miniparser.
2019-12-1145004: Fix typos in commentsMartijn Dekker1-2/+2
2019-11-18users/24445: Add :P modifier to history code.Peter Stephenson1-0/+10
This was in the glob qualifier and variable code but got missed out of the separate history modifier function.
2019-06-2044435: Handling digita arguments for :h and :t.Peter Stephenson1-12/+80
Pick number of leading or trailing path components to substitute. Active in history, brace parameters, glob qualifiers. Add tests for all three environments.
2019-03-1944142: Fix hist_reduce_spaces bug.Peter Stephenson1-2/+3
When there were as an unstripped comment on the line the pointer for stripping spaces could be bogus. Don't do any editing in that case.
2019-02-1844067: Make history read safer on interrupt.Yutian Li1-3/+9
Record if a read was interrupted and if so process it in full next time a read is needed.
2018-04-0442581(?): Fix ZLE inline history expansion.Peter Stephenson1-2/+20
Seen with magic-space. If there's a parse error in command subtitution we need to complete reading history to ensure the command line buffer is finished.
2018-01-2442322 (tweaked): Fix interactive_comments history with just a coment.Peter Stephenson1-1/+12
Don't discard the line from the history merely because it produced no synactic words.
2018-01-0842245: Abort last word on interactve comment.Peter Stephenson1-0/+22
Last recorded word should be the previous one.
2017-09-2541747: Don't create hash entry if just checking existence.Peter Stephenson1-2/+3
Pass a flag in indicating this case.
2017-06-0741239: Save and restore default history event on context stack.Peter Stephenson1-0/+2
This ensures that the default event set by an expansion in ZLE doesn't propagate to the command line expansion.
2017-05-3041164: Don't free a history entry if it's curline.Peter Stephenson1-27/+15
This replaces 41113 / 94014ff65b with a simple local change for the immediate problem. It's not entirely clear if this reflects wider changes in the structure of the history code.
2017-05-1841113 (tweaked): Save current line linkage to history ring.Peter Stephenson1-15/+27
When saving history state save whether the current history line is linked into the ring and remove it, and restore as appropriate later. This avoids surprises where the history ring is freed and incorrectly frees the current state in curline, which has a different allocation strategy. Original patch tweaked to make restoring more logical.
2017-01-0340248: suppress errors from zshaddhistoryhookBarton E. Schaefer1-1/+2
and do not call it if no history entry will be written
2016-11-2940035: Cosmetic fixes for comments and documentation.Eitan Adler1-1/+1
Mostly fixes to doubled words.
2016-11-1739958: Add extra byte to PATH_MAX allocations.Peter Stephenson1-1/+1
This ensures we've got enough space for a null, although this isn't always needed.
2016-10-0339545: Add some missing unqueue_signals().Peter Stephenson1-0/+1
All of these are added simply to fit existing logic in other branches.
2016-01-3037838: use UNUSED() consistentlyJun-ichi Takimoto1-1/+1
2016-01-2737819: zshaddhistory hook works for any history file write, even upon ↵Barton E. Schaefer1-4/+11
keyboard interrupt
2015-10-2136909: in getargs(), sanity-check the offsets for start and end of the ↵Barton E. Schaefer1-2/+16
requested words, in case of overflow
2015-09-1036468: Fix infinite loop exiting from Zle widget.Peter Stephenson1-0/+6
If the exit was while we were waiting to complete a lexical expression we might not exit from the loop.
2015-07-2435883: Don't attempt to back up over history if expanding aliasPeter Stephenson1-1/+2
2015-07-2335854: ensure history character unget doesn't recurse infinitelyPeter Stephenson1-2/+8
2015-06-12Add non-metafied character length handling.Peter Stephenson1-1/+1
Use this in regex module and add test using $'\ua0'. Rename mb_metacharinit() to mb_charinit() as it does not involve metafied characters.
2015-04-2534961: clean up declarations of quote() and quotebreak()Barton E. Schaefer1-3/+3
2015-03-2934817: Catch some errors earlier when reading history.Peter Stephenson1-1/+5
Mostly for the case of an interrupt. Don't try to process words when we know something's gone wrong. Also abort history reading earlier on an interrupt.
2015-03-2534776: improve suppression of alias expansions from history.Peter Stephenson1-34/+12
Now uses the mechanism in use for other forms of suppression of sections of input.
2015-03-2234759: improve implementation of last commitPeter Stephenson1-1/+2
2015-03-2234758: fix yet more history / command subst interaction.Peter Stephenson1-1/+13
In general we need to wind back over the history text input inside command substitution because there's no level of the input mechanism between history and the lexer.
2015-03-1934742: history expansion inside command substitution failed.Peter Stephenson1-2/+4
Needs the case of alias expansion separating out.
2015-02-2334623: free history more often if "remetafying"Peter Stephenson1-2/+6
2015-02-2334615 + 34619: Remeta one frame earlierMikael Magnusson1-35/+30