Maybe I should back up and describe my actual problem. I think I had
assumed the problem was something slightly different from what it actually
is, and this shopt does fix the problem I have. My actual problem (which I
view as a bug) is that often I will have several ssh sessions open, my
connection drops, and the commands I just executed are not in the history
when I reconnect, even though I have histappend on.
I'm realizing now that my understanding was a little incomplete - once the
server notices that the clients timed out, it should in fact write the
history for each shell and everything is fine. But to me this looks like my
history is lost forever because my new shell will never pick up that
history. It seems to me that by default history should be there when I
reconnect when histappend is on, and if it's not it's a bug. In your
earlier message ( https://lists.gnu.org/r/bug-bash/2024-08/msg00234.html )
you say "There are ways to do what you want, but those are not suitable for
(or desired by) everyone." A couple other people in the thread did suggest
making it configurable, which seems to me like a good middle ground.
On Tue, Nov 17, 2026 at 11:13 AM Chet Ramey <chet.ramey@case.edu> wrote:
> On 11/17/26 11:54 AM, Luke Schlather wrote:
> > An example is when the machine is rebooted in the middle of a
> long-running
> > command. I don't know that it's terribly often, but it has happened to
> me
> > enough that I'd like to make sure it doesn't happen again.
>
> I'm not sure this is of general enough interest to warrant a new shell
> option.
>
> Chet
>
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
> ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
>