fix variables, start tmux at the very end
This commit is contained in:
parent
f1aa0e2fc2
commit
00ff3298ac
2 changed files with 12 additions and 10 deletions
20
bashrc_add
20
bashrc_add
|
@ -175,8 +175,16 @@ EOF
|
|||
promptcommandmunge "_umask_hook"
|
||||
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
|
||||
logwarn "start tmux ${STARTTMUXDEFAULT} - ${STARTTMUXDEFAULT-$STARTTMUX}"
|
||||
logdebug "start tmux ${STARTTMUXDEFAULT} - ${STARTTMUXDEFAULT-$STARTTMUX}"
|
||||
if ${STARTTMUXDEFAULT-$STARTTMUX} ; then
|
||||
cat << EOF
|
||||
|
||||
|
@ -189,14 +197,8 @@ EOF
|
|||
sleep 1
|
||||
#screen -UxR
|
||||
tmux attach-session
|
||||
logwarn "started tmux"
|
||||
logdebug "started tmux"
|
||||
fi
|
||||
logwarn "after"
|
||||
cat << EOF >> "${MYSHELLCONFIG_LOGFILE}"
|
||||
==8<=== finished configure new shell ================ $(date) ===============8<==
|
||||
logdebug "after"
|
||||
|
||||
EOF
|
||||
#else
|
||||
# echo "non-interactive shell" >&2
|
||||
SCRIPTEXIT
|
||||
fi
|
||||
|
|
|
@ -81,7 +81,7 @@ if ! $SSHS; then
|
|||
|
||||
# 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
|
||||
STARTTMUX=true
|
||||
STARTTMUXDEFAULT=true
|
||||
fi
|
||||
|
||||
unset -f pathmunge
|
||||
|
|
Loading…
Reference in a new issue