UCL-ARC / swc-shell-split-window

Script to split the shell using tmux
MIT License
36 stars 16 forks source link

Make history log files session-dependent by default #10

Closed alex-ball closed 11 months ago

alex-ball commented 2 years ago

The documentation says "To do so [role play as different users], you would want to start to sessions in separate terminal windows [...]" with a command like LOG_FILE=/tmp/session1 BGCOLOR=12 ./swc-shell-split-window.sh. If you actually try to do this in parallel, it fails because the session name is the same both times, so the two windows are clones of each other (with admittedly a quite nice effect of having different background colours for the upper and lower panes).

This PR changes the documentation to recommend changing the SESSION variable instead in this situation. So that this "just works" with least surprise, it also makes the default value of LOG_FILE dependent on the SESSION variable instead of being hard-coded, so each session gets its own history unless you explicitly make them share.

rgaiacs commented 11 months ago

Thanks! Looks good to me.