set tmux-environment, if tmux is running

This commit is contained in:
Jakobus Schürz 2023-02-23 13:44:16 +01:00
parent cf3d960a10
commit fc2f62bb0f

View file

@ -30,7 +30,10 @@ function _pkcs11module() {
[ -n "${P11M:+x}" ] && PKCS11_MODULE=${P11M} [ -n "${P11M:+x}" ] && PKCS11_MODULE=${P11M}
[ -n "${P11M:+x}" ] && tmux set-environment P11M ${P11M} [ -n "${P11M:+x}" ] && tmux set-environment P11M ${P11M}
tmux set-environment PKCS11_MODULE ${PKCS11_MODULE} if [ -n "${TMUX}" ]; then
tmux set-environment PKCS11_MODULE ${PKCS11_MODULE}
tmux set-environment -g PKCS11_MODULE ${PKCS11_MODULE}
fi
} }
## 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,