* update config for early tmux versions

* use suffix for bash history from tmux pane number
This commit is contained in:
2024-10-15 12:47:08 +03:00
parent 58900e01a6
commit c89be0f5cc
3 changed files with 23 additions and 54 deletions

View File

@ -7,7 +7,11 @@ fi
# Add the tty to the history file
# Each terminal's history will be stored in
# its own file
HISTSUFFIX=`tty | sed 's/\///g;s/^dev//g'`
if [ ! -z "${TMUX_PANE}" ]; then
HISTSUFFIX="${TMUX_PANE}"
else
HISTSUFFIX=`tty | sed 's/\///g;s/^dev//g'`
fi
HISTFILE="$HOME/.bash_history_log/bash_history_$HISTSUFFIX"
# Time stamp for the history