fix tmux issues

This commit is contained in:
Jakobus Schürz 2023-03-07 12:07:41 +01:00
parent 424a923257
commit 5e10667910

View file

@ -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() {