diff options
author | Ismaël Bouya <ismael.bouya@fretlink.com> | 2018-11-13 12:08:57 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@fretlink.com> | 2018-11-18 13:20:49 +0100 |
commit | bfe7d9cb1f547161cb7c7f4924c62c6ef819e4d7 (patch) | |
tree | b757f5f08939d4823b5ba4223ceca5aca5f6bda8 /roles | |
parent | 86a3ca82c74c9109594b4d7c4a61f2d804b8ccc0 (diff) | |
download | Ansible-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.j2 | 5 |
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 | } |
92 | complete -o filenames -F _tmux_dev tmux_dev | 92 | complete -o filenames -F _tmux_dev tmux_dev |
93 | |||
94 | if [ -n "$TMUX" ]; then | ||
95 | TMUX_SESSION_NAME=$(tmux display-message -p "#S") | ||
96 | export HISTFILE="$XDG_STATE_HOME/bash/tmux_${TMUX_SESSION_NAME}_history" | ||
97 | fi | ||
93 | ##### /Fretlink | 98 | ##### /Fretlink |
94 | {% endif %} | 99 | {% endif %} |
95 | 100 | ||