Skip to content

Instantly share code, notes, and snippets.

View volfyd's full-sized avatar

Leif Huhn volfyd

  • Chattanooga, TN
View GitHub Profile
@jan-warchol
jan-warchol / sync-history.sh
Last active October 19, 2024 08:12
Synchronize history across bash sessions
# Synchronize history between bash sessions
#
# Make history from other terminals available to the current one. However,
# don't mix all histories together - make sure that *all* commands from the
# current session are on top of its history, so that pressing up arrow will
# give you most recent command from this session, not from any session.
#
# Since history is saved on each prompt, this additionally protects it from
# terminal crashes.