From a3312d8b7150e38bb69fb6e6e87306efc8df3c2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Wed, 23 Sep 2020 10:19:50 +0200 Subject: [PATCH] run when TMUX is empty or unset --- functions.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/functions.sh b/functions.sh index 120b73f..e01f2d7 100755 --- a/functions.sh +++ b/functions.sh @@ -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