Resurrectable sessions possible? (Setting ATUIN_SESSION = $TERM_SESSION_ID?)

Hi!

Just installed Atuin and had hoped it would solve my problem with separating session history (per terminal window/tab) from global history. This works perfectly fine until I have to log out/reboot, thus restarting the terminal app. Both Terminal.app & iTerm.app will automatically resurrect the TERM_SESSION_ID. The default behavior of Terminal.app means that session–specific history will be available in resurrected windows after reboot.

Unfortunately it seems the AUTIN_SESSION is recreated upon each restart which means I lose all session-specific history on logout. I have searched the docs without finding any hints on how to achieve this.

I tried export ATUIN_SESSION = ${TERM_SESSION_ID} in .zshrc , which seems to actually work. Is this a recommended approach or will it mess with Atuin internals?

(zsh, MacOS Sequoia).

Thanks,

Mikael

That won’t break anything! Feel free to do so

ATUIN_SESSION is reset whenever a new shell session begins, and we don’t really have awareness of the terminal session (and I’d rather avoid doing so, by default).

1 Like