Permalink
Browse files

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

… the tmux easy.
  • Loading branch information...
1 parent 6282f0a commit 857fe4bde426a60bed56ed1c757881c2584ea7d7 @al-the-x committed Mar 29, 2012
Showing with 16 additions and 0 deletions.
  1. +16 −0 bin/tmux_with
View
@@ -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"
+

0 comments on commit 857fe4b

Please sign in to comment.