Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

I get tired of typing complex commands repeatedly. This makes sharing…

… the tmux easy.
  • Loading branch information...
commit 857fe4bde426a60bed56ed1c757881c2584ea7d7 1 parent 6282f0a
@al-the-x authored
Showing with 16 additions and 0 deletions.
  1. +16 −0 bin/tmux_with
View
16 bin/tmux_with
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+CMD=$(which tmux 2>/dev/null)
+
+if [[ -z "$CMD" ]]; then
+ echo "Is tmux installed?"
+ exit 1
+fi
+
+if [[ -z "$1" ]]; then
+ echo "Please specify a user!"
+ exit 1
+fi
+
+sudo -u $1 -s "$CMD attach || $CMD"
+
Please sign in to comment.
Something went wrong with that request. Please try again.