fix variables, start tmux at the very end

This commit is contained in:
Jakobus Schürz 2020-11-30 09:43:27 +01:00
parent f1aa0e2fc2
commit 00ff3298ac
2 changed files with 12 additions and 10 deletions

View file

@ -175,8 +175,16 @@ EOF
promptcommandmunge "_umask_hook" promptcommandmunge "_umask_hook"
which direnv >/dev/null && eval "$(direnv hook bash)" which direnv >/dev/null && eval "$(direnv hook bash)"
cat << EOF >> "${MYSHELLCONFIG_LOGFILE}"
==8<=== finished configure new shell ================ $(date) ===============8<==
EOF
#else
# echo "non-interactive shell" >&2
SCRIPTEXIT
# Start tmux if not defined as STARTTMUX in bashrc # Start tmux if not defined as STARTTMUX in bashrc
logwarn "start tmux ${STARTTMUXDEFAULT} - ${STARTTMUXDEFAULT-$STARTTMUX}" logdebug "start tmux ${STARTTMUXDEFAULT} - ${STARTTMUXDEFAULT-$STARTTMUX}"
if ${STARTTMUXDEFAULT-$STARTTMUX} ; then if ${STARTTMUXDEFAULT-$STARTTMUX} ; then
cat << EOF cat << EOF
@ -189,14 +197,8 @@ EOF
sleep 1 sleep 1
#screen -UxR #screen -UxR
tmux attach-session tmux attach-session
logwarn "started tmux" logdebug "started tmux"
fi fi
logwarn "after" logdebug "after"
cat << EOF >> "${MYSHELLCONFIG_LOGFILE}"
==8<=== finished configure new shell ================ $(date) ===============8<==
EOF
#else
# echo "non-interactive shell" >&2
SCRIPTEXIT
fi fi

View file

@ -81,7 +81,7 @@ if ! $SSHS; then
# Start tmux if not defined as STARTTMUX in bashrc # Start tmux if not defined as STARTTMUX in bashrc
if test ! $TMUX && test $SSH_TTY && test $TERM != screen && test $(systemctl status tmux@${USER}.service 1>/dev/null 2>&1; echo $? ) -eq 0; then if test ! $TMUX && test $SSH_TTY && test $TERM != screen && test $(systemctl status tmux@${USER}.service 1>/dev/null 2>&1; echo $? ) -eq 0; then
STARTTMUX=true STARTTMUXDEFAULT=true
fi fi
unset -f pathmunge unset -f pathmunge