fix tmux issues

This commit is contained in:
Jakobus Schürz 2023-03-07 12:07:41 +01:00 committed by Jakobus Schürz
parent 52877e5f9a
commit f1c113c89a

View file

@ -57,11 +57,21 @@ function _pkcs11module_hook() {
fi fi
} }
<<<<<<< HEAD
## this function updates in combination with PROMPT_COMMAND the shell-environment-variables in tmux-sessions, ## 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) # 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() { 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 if [ -n "${TMUX}" ]; then
eval "$(tmux show-environment -s)" 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 { function _umask_hook {
# Record the default umask value on the 1st run # To make the code more reliable on detecting the default umask
[[ -z $DEFAULT_UMASK ]] && export DEFAULT_UMASK="$(builtin umask)" # Record the default umask value on the 1st run
[[ -z $DEFAULT_UMASK ]] && export DEFAULT_UMASK="$(builtin umask)"
if [[ -n $UMASK ]]; then if [[ -n $UMASK ]]; then
umask "$UMASK" umask "$UMASK"
else else
umask "$DEFAULT_UMASK" umask "$DEFAULT_UMASK"
fi fi
} }
function cpb() { function cpb() {