fix two bugs with shells started to run executable scripts inheriting shell state; fix potential buffer overflow in brace expansion; fix crash caused by nofork command substitution not saving enough state

This commit is contained in:
Chet Ramey
2024-01-23 16:38:15 -05:00
parent a4f44b7a11
commit 10702735a0
8 changed files with 93 additions and 30 deletions
+19 -4
View File
@@ -6,9 +6,9 @@
.\" Case Western Reserve University
.\" chet.ramey@case.edu
.\"
.\" Last Change: Thu Jan 18 11:05:09 EST 2024
.\" Last Change: Fri Jan 19 11:53:57 EST 2024
.\"
.TH HISTORY 3 "2023 January 18" "GNU History 8.3"
.TH HISTORY 3 "2024 January 19" "GNU History 8.3"
.\"
.\" File Name macro. This used to be `.PN', for Path Name,
.\" but Sun doesn't seem to like that very much.
@@ -645,8 +645,23 @@ string, in addition to space, tab, \fI:\fP and \fI?\fP in the case of
a substring search. The default is empty.
.Vb int history_quotes_inhibit_expansion
If non-zero, double-quoted words are not scanned for the history expansion
character or the history comment character. The default value is 0.
If non-zero, the history expansion code implements shell-like quoting:
single-quoted words are not scanned for the history expansion
character or the history comment character, and double-quoted words may
have history expansion performed, since single quotes are not special
within double quotes.
The default value is 0.
.Vb int history_quoting_state
An application may set this variable to indicate that the current line
being expanded is subject to existing quoting. If set to \fI\(aq\fP, the
history expansion function will assume that the line is single-quoted and
inhibit expansion until it reads an unquoted closing single quote; if set
to \fI\(dq\fP, history expansion will assume the line is double quoted until
it reads an unquoted closing double quote. If set to zero, the default,
the history expansion function will assume the line is not quoted and
treat quote characters within the line as described above.
This is only effective if \fBhistory_quotes_inhibit_expansion\fP is set.
.Vb "rl_linebuf_func_t *" history_inhibit_expansion_function
This should be set to the address of a function that takes two arguments: