Terminator history unique for each split

Asked by Hal Chadwick

Hello, I would like to know how to make my shell history (zsh) unique for each split instance within Terminator.

Question information

Language:
English Edit question
Status:
Answered
For:
Terminator Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Stephen Boddy (stephen-j-boddy) said :
#1

This is not actually anything directly to do with Terminator. You simply need to set the HISTFILE env var for your zsh. You may need to tweak other items to have the history written live (as opposed to on logout).

If you just want a unique record then under terminator you could use the TERM_UUID env variable, i.e.
HISTFILE=~/.history_${TERM_UUID}
You would need to add this to whatever the zsh equivalent of .bashrc is. I'm not sure if the TERM_UUID is set /before/ the shell is started. It would probably need some logic to detect that it is /not/ running under Terminator and just fallback to the default if not. Of course there is no persistence across sessions unless you use layouts where the UUID is persistent.

An alternative is to use something else to differentiate your individual shells, which is an exercise left to the reader.

Can you help with this problem?

Provide an answer of your own, or ask Hal Chadwick for more information if necessary.

To post a message you must log in.