diff options
Diffstat (limited to 'shell')
-rwxr-xr-x | shell | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -42,10 +42,19 @@ function shell_wtmux_ls { # Try tmux, then screen function shell_remote_multiplexer { + # Default tmux command tmux="tmux attach" + # 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 -t $1" + tmux="tmux -L${1} attach -t $1" fi echo "$SUDO $tmux || $SUDO screen -x $1" @@ -71,9 +80,9 @@ if [ "$BASENAME" == "shells" ]; then # 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 |