Re: Very Unexpected response from command 'set'

2024-12-16 Thread Chet Ramey
On 12/15/24 10:35 AM, Robert Elz wrote: Date:Sat, 14 Dec 2024 19:21:50 -0500 From:Greg Wooledge Message-ID: <20241215002150.gc30...@wooledge.org> | The output of "set" includes more than just variables. It also includes | shell functions. But that's a cle

Re: [PATCH] _rl_abort_internal: reset _rl_command_to_execute

2024-12-16 Thread Chet Ramey
On 12/13/24 7:50 PM, Grisha Levit wrote: If a key sequence ending with an isearch terminator is bound to a function that longjmps, entering such a sequence during an isearch causes readline to loop forever. echo '".\e": end-kbd-macro' > irc INPUTRC=irc bash --norc -in <<< $'X\n\cRX.\e'

Re: history-search-* and undo lists

2024-12-16 Thread Chet Ramey
On 12/13/24 2:36 PM, Grisha Levit wrote: On Thu, Dec 12, 2024 at 5:03 PM Chet Ramey wrote: On 12/12/24 2:07 PM, Grisha Levit wrote: FWIW there's still a use-after-free with something like: HISTFILE= INPUTRC=/ bash --norc -in <<< $'X\n\cPX\cR\n!\e3X\e^\n\cP' Thanks for the report. See al

[PATCH 6/9] Slightly revise documentation of POSIX mode.

2024-12-16 Thread G. Branden Robinson
* doc/bash.1: Introduce "POSIX mode" earlier in the document. Set the word "POSIX" in small caps (as traditionally done for acronyms) to parallel the typesetting of the "bashref" Texinfo manual. Also set the phrase "POSIX mode" in italics, but only on the introduction of the term. Do not

[PATCH 7/9] Improve bash.1 man page/bashref.texi alignment.

2024-12-16 Thread G. Branden Robinson
Break lines in the same places for ease of diffing and maintenance. Parallelize/copy material to align the documents more closely. Favor man(7) font selection/alternation macros over roff(7) font selection escape sequences. Protect more literals from hyphenation. Quote the `+=` operator in the

[PATCH 5/9] doc/bash.1: Stop manipulating adjustment.

2024-12-16 Thread G. Branden Robinson
Unfortunately, the *roff `ad` request doesn't work like everyone seems to think it does. When invoked without an argument, it does not mean "restore whatever the previous adjustment mode was before I invoked `na` to turn off adjustment". Instead, it means "make sure lines are adjusted regardless

[PATCH 2/9] doc/bash.1: Document approach to conditional text.

2024-12-16 Thread G. Branden Robinson
--- doc/bash.1 | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/bash.1 b/doc/bash.1 index e58c1e8a..54ebb696 100644 --- a/doc/bash.1 +++ b/doc/bash.1 @@ -7,7 +7,10 @@ .\" .\"Last Change: Thu Dec 12 13:37:07 EST 2024 .\" -.\" bash_builtins, strip all but Builtins s

[PATCH 8/9] doc/bash.1: Recast lead sentence.

2024-12-16 Thread G. Branden Robinson
Mention (Stephen) Bourne and his shell's origin in Unix. The Bourne shell, like the rest of Seventh Edition Unix, has been Free Software (albeit GPL-incompatible) for a couple of decades now. It should therefore be okay to more clearly cite precedent without RMS materializing to chide us for utte

[PATCH 1/9] Adjust style of "export-completions" documentation.

2024-12-16 Thread G. Branden Robinson
* doc/bash.1: + Drop explicit `sp` request in favor of inter-paragraph spacing. + Set items returned by Readline command as bulleted list. + Identify "N" as the parameter replaced by the number of matches. + Set "readline" in boldface, for consistency with rest of page. + Set parameters "

[PATCH 4/9] doc/bash.1: Fix macro usage nit.

2024-12-16 Thread G. Branden Robinson
We want the comma in roman, not bold. an.tmac:doc/bash.1:9432: style: .BR expects at least 2 arguments, got 1 (Use `-r CHECKSTYLE=4` with groff 1.23.0 to obtain the foregoing style warning.) --- doc/bash.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/bash.1 b/doc/bash.

[PATCH 3/9] doc/bash.1, doc/bashref.texi: Align wording.

2024-12-16 Thread G. Branden Robinson
* Perform Kemper notectomy. * Break lines in the same places to ease diffing. * Align verb tenses. --- doc/bash.1 | 11 ++- doc/bashref.texi | 28 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/doc/bash.1 b/doc/bash.1 index 54ebb696..676

[PATCH 9/9] doc/bash.1: Resync w/ lib/readline/doc/readline.3.

2024-12-16 Thread G. Branden Robinson
Break lines in similar places; this eases diffing. Apply wording change that didn't get reflected in bash.1, and correct inadvertently boldfaced text. Favor man(7) font selection/alternation macros over roff(7) font selection escape sequences. --- doc/bash.1 | 15 ++-

Re: history -s from inside function replaces last command rather than adding to it

2024-12-16 Thread Greg Wooledge
On Mon, Dec 16, 2024 at 21:46:21 -0500, Chet Ramey wrote: > On 12/16/24 9:36 PM, Dale R. Worley wrote: > > Chet Ramey writes: > > > Yes: > > > > > > -s Store the args in the history list as a single entry. > > > The last command in the history list is removed

Re: history -s from inside function replaces last command rather than adding to it

2024-12-16 Thread Chet Ramey
On 12/16/24 9:36 PM, Dale R. Worley wrote: Chet Ramey writes: Yes: -s Store the args in the history list as a single entry. The last command in the history list is removed before adding the args. That last command is usually `history -s a

Re: history -s from inside function replaces last command rather than adding to it

2024-12-16 Thread Dale R. Worley
Chet Ramey writes: > Yes: > > -s Store the args in the history list as a single entry. > The last command in the history list is removed before > adding the args. > > That last command is usually `history -s args'. What is the point of "history