Hi Jean,

Jean Louis <bugs@gnu.support> writes:

>>   > Say that the history has eight entries, and a ninth was added by a
>>   > parallel process, the current process would be at the point after the
>>   > eighth element and should continue reading from there next time it wants
>>   > a history entry.
>
> Arsen, explore options of the command `history' to do what you want,
> you can save history:
>
> $ history -a
>
> and you can re-read history file:
>
> $ history -r
>
> and by using those options you can mix history from different Bash
> sessions, and also re-use the history from other Bash session.

Thanks for the tip.  I already have something using these flags
implemented:

  PROMPT_COMMAND="$PROMPT_COMMAND;history -a; history -c; history -r")

which is a functional hack, for the most part.  It still has some of the
problems mentioned in my original message (history is only added to
after a command concludes, sporadic truncation still happens, etc), plus
this approach is rather ugly.

Thanks again, have a lovely day.
-- 
Arsen Arsenović

Attachment: signature.asc
Description: PGP signature

---
via emacs-tangents mailing list 
(https://lists.gnu.org/mailman/listinfo/emacs-tangents)
  • ... Richard Stallman
    • ... mbork
    • ... Arsen Arsenović via Emacs news and miscellaneous discussions outside the scope of other Emacs mailing lists
      • ... Richard Stallman
        • ... Arsen Arsenović via Emacs news and miscellaneous discussions outside the scope of other Emacs mailing lists
    • ... Jean Louis
      • ... Arsen Arsenović via Emacs news and miscellaneous discussions outside the scope of other Emacs mailing lists
  • ... Richard Stallman
    • ... brickviking
    • ... Arsen Arsenović via Emacs news and miscellaneous discussions outside the scope of other Emacs mailing lists

Reply via email to