run when TMUX is empty or unset

This commit is contained in:
Jakobus Schürz 2020-09-23 10:19:50 +02:00
parent 40c5bb45a7
commit a3312d8b71

View file

@ -9,11 +9,12 @@ export TMUX_SESSION_DIRS SETPROXY_CREDS_DIRS KERBEROS_CONFIG_DIRS
## this function updates in combination with PROMPT_COMMAND the shell-environment-variables in tmus-sessions,
# every time prompt is called. It does it only, when called from tmux (Environment TMUX is set)
function prompt_command() {
[ -z "${TMUX+x}" ] || eval "$(tmux show-environment -s)"
# [ -z "${TMUX+x}" ] || eval "$(tmux show-environment -s)"
if [ -n "${TMUX}" ]; then
eval "$(tmux show-environment -s)"
fi
# if [ -n "${TMUX}" ]; then
# eval "$(tmux show-environment -s)"
# fi
}
PROMPT_COMMAND=prompt_command