From f1c113c89ad99357cd3ef91d5fadcbc0b2fc80ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Tue, 7 Mar 2023 12:07:41 +0100 Subject: [PATCH] fix tmux issues --- functions.sh | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/functions.sh b/functions.sh index ed4b37a..ae5d4d2 100755 --- a/functions.sh +++ b/functions.sh @@ -57,11 +57,21 @@ function _pkcs11module_hook() { fi } +<<<<<<< HEAD ## this function updates in combination with PROMPT_COMMAND the shell-environment-variables in tmux-sessions, # every time prompt is called. It does it only, when called from tmux (Environment TMUX is set) +||||||| parent of a74d663 (fix tmux issues) +## this function updates in combination with PROMPT_COMMAND the shell-environment-variables in tmux-sessions, +# every time prompt is called. It does it only, when called from tmux (Environment TMUX is set) +======= + +>>>>>>> a74d663 (fix tmux issues) function _tmux_hook() { -# [ -z "${TMUX+x}" ] || eval "$(tmux show-environment -s)" + + ## this function updates in combination with PROMPT_COMMAND the shell-environment-variables in tmux-sessions, + # every time prompt is called. It does it only, when called from tmux (Environment TMUX is set) + # [ -z "${TMUX+x}" ] || eval "$(tmux show-environment -s)" if [ -n "${TMUX}" ]; then eval "$(tmux show-environment -s)" @@ -69,16 +79,16 @@ function _tmux_hook() { } -# To make the code more reliable on detecting the default umask function _umask_hook { - # Record the default umask value on the 1st run - [[ -z $DEFAULT_UMASK ]] && export DEFAULT_UMASK="$(builtin umask)" + # To make the code more reliable on detecting the default umask + # Record the default umask value on the 1st run + [[ -z $DEFAULT_UMASK ]] && export DEFAULT_UMASK="$(builtin umask)" - if [[ -n $UMASK ]]; then - umask "$UMASK" - else - umask "$DEFAULT_UMASK" - fi + if [[ -n $UMASK ]]; then + umask "$UMASK" + else + umask "$DEFAULT_UMASK" + fi } function cpb() {