add PROMPT_COMMAND for updating tmux-env

This commit is contained in:
Jakobus Schürz 2020-09-23 08:10:20 +02:00
parent 6eb7318dac
commit 2b0ab2550f

View file

@ -48,3 +48,11 @@ fi
# ---- END X2Go SSH forwarding workaround ----
https://www.johntobin.ie/blog/updating_environment_variables_from_tmux/
function prompt_command() {
if [ -n "${TMUX}" ]; then
eval "$(tmux show-environment -s)"
fi
}
PROMPT_COMMAND=prompt_command