summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@fretlink.com>2018-11-13 12:08:57 +0100
committerIsmaël Bouya <ismael.bouya@fretlink.com>2018-11-18 13:20:49 +0100
commitbfe7d9cb1f547161cb7c7f4924c62c6ef819e4d7 (patch)
treeb757f5f08939d4823b5ba4223ceca5aca5f6bda8 /roles
parent86a3ca82c74c9109594b4d7c4a61f2d804b8ccc0 (diff)
downloadAnsible-bfe7d9cb1f547161cb7c7f4924c62c6ef819e4d7.tar.gz
Ansible-bfe7d9cb1f547161cb7c7f4924c62c6ef819e4d7.tar.zst
Ansible-bfe7d9cb1f547161cb7c7f4924c62c6ef819e4d7.zip
Add bash history per tmux session
Diffstat (limited to 'roles')
-rw-r--r--roles/shell/bash/templates/bashrc.j25
1 files changed, 5 insertions, 0 deletions
diff --git a/roles/shell/bash/templates/bashrc.j2 b/roles/shell/bash/templates/bashrc.j2
index 91334b7..fabe53f 100644
--- a/roles/shell/bash/templates/bashrc.j2
+++ b/roles/shell/bash/templates/bashrc.j2
@@ -90,6 +90,11 @@ _tmux_dev() {
90 done 90 done
91} 91}
92complete -o filenames -F _tmux_dev tmux_dev 92complete -o filenames -F _tmux_dev tmux_dev
93
94if [ -n "$TMUX" ]; then
95 TMUX_SESSION_NAME=$(tmux display-message -p "#S")
96 export HISTFILE="$XDG_STATE_HOME/bash/tmux_${TMUX_SESSION_NAME}_history"
97fi
93##### /Fretlink 98##### /Fretlink
94{% endif %} 99{% endif %}
95 100