Compare commits

...

2 Commits

Author SHA1 Message Date
Bruno Sutic 3606e4f602
Merge pull request #443 from rbren/master
Fix for restoring bash history
2022-07-16 13:55:50 +02:00
Robert Brennan 7f5fa4bed2
Update restoring_bash_history.md 2022-07-15 16:36:24 -04:00
1 changed files with 2 additions and 2 deletions

View File

@ -19,13 +19,13 @@ mkdir -p "${HISTS_DIR}"
if [ -n "${TMUX_PANE}" ]; then
# Check if we've already set this pane title
pane_id=$(tmux display-message -p '#{pane_title}')
pane_id=$(tmux display -pt "${TMUX_PANE:?}" "#{pane_title}")
if [[ $pane_id != "$pane_id_prefix"* ]]; then
# if not, set it to a random ID
random_id=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 16)
printf "\033]2;$pane_id_prefix$random_id\033\\"
pane_id=$(tmux display-message -p '#{pane_title}')
pane_id=$(tmux display -pt "${TMUX_PANE:?}" "#{pane_title}")
fi
# use the pane's random ID for the HISTFILE