Mikael Magnusson
6a5339fdd5
34107: getsubsargs: free ptr1 before returning
...
Found by Coverity (Issue 439073).
2015-01-06 23:51:00 +01:00
Mikael Magnusson
adae710eb0
34106: hist: use zhtricat instead of tricat
...
Found by Coverity (Issue 1255769).
2015-01-06 23:47:23 +01:00
Mikael Magnusson
6b79f29fb2
34118: Don't crash when writing out history if HOST is unset
...
Found by Coverity (Issue 1255793).
2015-01-06 23:45:26 +01:00
Peter Stephenson
d067ebcacd
33876: etc.: Separate errors and keyboards interrupts
...
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-12-11 09:41:17 +00:00
Oliver Kiddle
62aa039317
33820: detect support for realpath() with a NULL
...
argument and fixes to the use of it
2014-11-30 23:33:30 +01:00
Barton E. Schaefer
605a73e415
33429: disallow non-integer values for HISTSIZE and SAVEHIST of "fc -p", and fix crash on zero values for same
2014-10-10 23:12:57 -07:00
Peter Stephenson
f2aaea5cd3
users/19183: improve unlikely error case with fdopen in history code
2014-09-29 17:17:26 +01:00
Barton E. Schaefer
4414e54ea7
33116: followup to 32580 to prevent double-locking with shared or incremental history
2014-09-06 22:10:30 -07:00
Barton E. Schaefer
b63ff19dbf
32882 (cf. Augie Fackler 32879): correct reload of backslash-continuation lines from history, fix bad history write of events ending with backslashes
2014-07-17 19:53:11 -07:00
Peter Stephenson
7f6dc0fe8e
32682 with tweaks: Add INC_APPEND_HISTORY_TIME.
...
Revert INC_APPEND_HISTORY behaviour.
2014-06-06 21:56:47 +01:00
Barton E. Schaefer
979f72199f
32580: avoid indefinite wait in lockhistfile() by checking for lock file time stamp in the future
...
Also change behavior of HIST_FCNTL_LOCK to use only fcntl() locking, rather
than applying both kinds of lock.
2014-04-25 08:30:18 -07:00
Barton E. Schaefer
f61037a0b0
32531: fix memory leaks detected by valgrind
2014-04-06 09:55:49 -07:00
Barton E. Schaefer
ff520d1b79
31823: add HISTORY_IGNORE parameter
...
HISTORY_IGNORE defines a pattern to exclude matching lines in the internal
history from the HISTFILE at write time.
2013-10-17 07:28:52 -07:00
Peter Stephenson
73ececfd01
31830: New feature for zshaddhistory hooks.
...
If the first non-zero return status is 2, save the line on the
internal history list, but don't write it out.
2013-10-17 10:14:25 +01:00
Peter Stephenson
d0fe73c5fb
31815: another fix for INCAPPENDHISTORY change.
...
We need to save immediately if something is pushed on the history stack
to ensure we use the right file before popping.
2013-10-11 11:13:03 +01:00
Barton E. Schaefer
8ffdf161c7
31797: to match documentation, avoid expanding history when there is neither a
...
word nor an event designator
There are still a few cases where expansion is attempted even though the
documentation indicates it will not be, but in most of those cases the
expansion will fail. The now-fixed case would fall back to default
expansion of the previous command.
2013-10-08 07:21:29 -07:00
Peter Stephenson
6f195241f3
31794: further refinement to INCAPPENDHISTORY change.
...
With SHAREHISTORY we should make sure the code behaves as it always
did, because it takes care about locking a file once for reading
and writing.
2013-10-07 13:01:26 +01:00
Peter Stephenson
9345e57859
31793: Fix problem with non-interactive history.
...
Modify 31789 so it doesn't try to save history from hbegin()
in that case.
2013-10-07 11:43:55 +01:00
Han Pingtian
16ff79a885
31789: Save history for INCAPPENDHISTORY later.
...
This improves the timing recorded in the history.
2013-10-05 22:03:43 +01:00
Barton E. Schaefer
98b0828c63
31770: memmove() instead of memcpy() for overlapping regions.
2013-09-26 21:24:58 -07:00
Peter Stephenson
0b185e3dcd
users/17908: Keep history line in sync between ZLE and shell.
...
Update ZLE version if history is read, pushed or popped with ZLE active
2013-08-08 19:48:11 +01:00
Peter Stephenson
e282fd8ecb
31750: fix for HISTREDUCEBLANKS option.
...
Don't truncate line after marked words if there's more
non-white-space text, which is probably comments.
2013-07-24 15:54:55 +01:00
Peter Stephenson
7c56d77184
30789: Add CONTINUE_ON_ERROR for old behaviour.
...
New behaviour is for scripts to exit on error instead of returning
to top level and executing the next command.
2012-11-15 21:08:15 +00:00
Bart Schaefer
19fe2dcc03
30433: double backslash is not line continuation.
2012-04-21 18:42:56 +00:00
Peter Stephenson
fe7337447c
Timothy Redaelli: file name manipulations
...
in history can return NULL if HAVE_CANONICALIZE_FILE_NAME
2012-02-08 09:35:17 +00:00
Bart Schaefer
f7111d3358
29694: avoid overwriting current history word when not expanding an alias
...
or history event in-place.
2011-08-18 02:24:10 +00:00
Mikael Magnusson
d0366e1960
unposted: fix a typo in a comment.
2011-08-14 14:16:45 +00:00
Peter Stephenson
5c3c825e5f
users/16131: skip reading empty history file
2011-07-18 18:13:03 +00:00
Peter Stephenson
a05a51ce8a
29542: fix crash in hbegin(), remove bad test
...
29543: fix backslash-newline within words with histlexwords
2011-07-12 08:37:11 +00:00
Peter Stephenson
12e246495c
29413: "print -S" for saving to history with lexical word split
2011-06-03 19:54:43 +00:00
Peter Stephenson
31456074c8
histlexwords splitting of ";;" in case
2011-05-27 21:56:09 +00:00
Mikael Magnusson
72cb7cfc6f
29307, 29308 + replies: Fix some doubled words in docs and comments.
2011-05-19 16:10:46 +00:00
Peter Stephenson
ebcead7543
lexsave/lexrestore lexflags
...
add new LEXFLAGS_ZLE
2010-12-14 10:35:38 +00:00
Peter Stephenson
eab4f9a83c
28528: Rearrange zleparse to lexflags
...
Add (z+n+)
2010-12-14 09:59:04 +00:00
Peter Stephenson
0a5702457b
28510: add (z+c+) and (z+C+) parameter flags
2010-12-12 22:44:50 +00:00
Peter Stephenson
af5a85f363
28339: backslash-newline history without HIST_LEX_WORDS
...
28340: assignment to range of scalar variable with multibyte characters
2010-10-10 17:51:29 +00:00
Peter Stephenson
6fea7f0d3c
28332: backslash-newline with HIST_LEX_WORDS
2010-10-10 17:26:38 +00:00
Peter Stephenson
1cdaf8c459
28327: fix pseudolexical word splitting with RC_QUOTES
2010-10-07 16:49:50 +00:00
Peter Stephenson
92c826555d
not yet posted: fix some more HIST_LEX_WORDS anomalies
2010-10-06 13:07:43 +00:00
Peter Stephenson
8aac69241f
28319: (z) splitting oddities
2010-10-06 08:27:09 +00:00
Peter Stephenson
66f32a80dc
28308/28310: HIST_LEX_WORDS, check for quick history read
2010-10-02 21:03:03 +00:00
Peter Stephenson
5ca08eccd0
28295 plus tweak: use lexer to split words from history file
2010-09-25 18:49:36 +00:00
Peter Stephenson
e3f764d1ef
28047: attempt to make locking with fc command more useful
2010-06-22 11:00:31 +00:00
Peter Stephenson
c2fdffa316
27823: fix memory access in 27822
2010-03-22 23:20:11 +00:00
Peter Stephenson
08dec290d4
Fix ZLE access to pushed history line
2010-03-22 16:22:13 +00:00
Wayne Davison
6e317e4b96
Add symlink-based hist-file locking.
2009-12-18 19:50:45 +00:00
Peter Stephenson
fff4f63b97
27216: set chwords to NULL when freed
2009-08-16 20:37:44 +00:00
Peter Stephenson
3e1e46e9d2
26748: c modifier to add command path
2009-03-23 12:17:32 +00:00
Peter Stephenson
06e22c9370
Bart: 26761: typo in realpath() check
2009-03-20 10:36:06 +00:00
Peter Stephenson
cb6856d115
26754: tweak zgetdir() and test for realpath()
2009-03-19 15:00:18 +00:00