# Default tmux command
tmux="tmux attach"
- # Common socket version
- if [ ! -z "$1" ]; then
- tmux="tmux attach -t $1"
- fi
+ # Version with a common socket
+ #if [ ! -z "$1" ]; then
+ # tmux="tmux attach -t $1"
+ #fi
+ # Version with a separate socket
# Ensure there's a separate server running for each session.
# Check wscreen for details
- #if [ ! -z "$1" ]; then
- # tmux="tmux attach -L${1} -t $1"
- #fi
+ if [ ! -z "$1" ]; then
+ tmux="tmux -L${1} attach -t $1"
+ fi
echo "$SUDO $tmux || $SUDO screen -x $1"
}
# Remote screen shell using $AUTOSSH
if [ "$COMMAND" == "root" ]; then
SUDO="sudo"
- $AUTOSSH $DEST -t -- "`shell_remote_multiplexer`"
+ $AUTOSSH $DEST -t -- "`shell_remote_multiplexer $COMMAND`"
else
- $AUTOSSH $DEST -t -- "`shell_remote_multiplexer` $COMMAND $*"
+ $AUTOSSH $DEST -t -- "`shell_remote_multiplexer $COMMAND` $COMMAND $*"
fi
else
if [ -z "$COMMAND" ] && shell_${LOCAL_MULTIPLEXER}_ls $DEST; then