summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xssh-tmux.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/ssh-tmux.sh b/ssh-tmux.sh
index a7a7bac..2568e24 100755
--- a/ssh-tmux.sh
+++ b/ssh-tmux.sh
@@ -43,6 +43,6 @@ if [ $# -eq 0 ]; then
err_exit "missing command argument"
fi
-cmd="\"\$SHELL\" -ilc 'trap '\''ret=\$? ; [ \$ret -eq 0 ] || print -u2 -- \"[exited with status \$ret]\" ; exec \"\$SHELL\"'\'' EXIT INT ; $*'"
+cmd="\"\$SHELL\" -ilc '( $* ) || print -u2 -- \"[exited with status \$?]\" ; exec \"\$SHELL\"'"
exec ssh -t "$host" -- tmux new-session ${detach:+-d} ${session:+-s \"$session\"} ${window:+-n \"$window\"} "$cmd"
Generated by cgit. See skreutz.com for my tech blog and contact information.