mirror of
https://github.com/tmux-plugins/tmux-resurrect.git
synced 2024-11-22 04:18:48 +00:00
Update restoring_bash_history.md
This commit is contained in:
parent
8101d98358
commit
7f5fa4bed2
@ -19,13 +19,13 @@ mkdir -p "${HISTS_DIR}"
|
|||||||
if [ -n "${TMUX_PANE}" ]; then
|
if [ -n "${TMUX_PANE}" ]; then
|
||||||
|
|
||||||
# Check if we've already set this pane title
|
# 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 [[ $pane_id != "$pane_id_prefix"* ]]; then
|
||||||
|
|
||||||
# if not, set it to a random ID
|
# if not, set it to a random ID
|
||||||
random_id=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 16)
|
random_id=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 16)
|
||||||
printf "\033]2;$pane_id_prefix$random_id\033\\"
|
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
|
fi
|
||||||
|
|
||||||
# use the pane's random ID for the HISTFILE
|
# use the pane's random ID for the HISTFILE
|
||||||
|
Loading…
Reference in New Issue
Block a user