tmux-resurrect: [Bug] Pane command history (bash history) is not saved/restored
I am not sure if this is a continuum or a resurrect issue)
Am I missing a configuration somewhere?
I have 5 panes set up in my session, and I have the following config:
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/resurrect'
set -g @plugin 'tmux-plugins/continuum'
# Enable autorestore
set -g @continuum-restore 'on'
# Save session every 5 minutes
set -g @continuum-save-interval '1'
# Save shell history (THIS IS BROKEN)
#set -g @resurrect-save-shell-history 'on'
# Save pane contents
set -g @resurrect-capture-pane-contents 'on'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'
When I reboot, then run tmux, my last session of 5 panes is restored. I even see the outputs in each pane as they appeared before reboot. However, when I navigate through each pane and use the up arrow key to re-run the most recently run command in said pane, the command is incorrect. In fact, they all show the same command (the last command I executed in any terminal session, anywhere, before reboot). So, if I rebooted from the command line with sudo reboot, the last command (hitting up arrow once) in each pane is sudo reboot.
I must be missing something, right? I’ve tried lots of googling and combing through issues here to no avail. Thanks in advance for the help.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (1 by maintainers)
I have this issue too, why was the feature deprecated, it is extremely useful when using a terminal to be able to access your history.
The feature was deprecated in this commit for this reason:
And it was later removed completely in this commit.
A lot of relevant discussions happened in issue #288. Specifically this comment, where a potential workaround is proposed. I have tried the solution and it does work for me.
I’ll quote the comment here for posterity:
Bash history restore feature is deprecated and will be fully removed soon. See https://github.com/tmux-plugins/tmux-resurrect/commit/d7825683d1ca142512254d15ed91b20593fa0d66
What to do now?