about summary refs log tree commit diff
path: root/functions
diff options
context:
space:
mode:
Diffstat (limited to 'functions')
-rw-r--r--functions/misc_functions.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/functions/misc_functions.sh b/functions/misc_functions.sh
index ed7f6293c08f..728c6e453b8a 100644
--- a/functions/misc_functions.sh
+++ b/functions/misc_functions.sh
@@ -46,7 +46,19 @@ function trim {
 }
 
 
-function wgreviewers {
-  echo "BJ Warshaw\nDaniel Wasilewski\nSean Sullivan\nCharles Morrissey\nRyan Balch\nZach Goldstein\nWilliam Anderson"
+function tt() {
+  sessionName="${1}"
+  if ! tmux has-session -t "${sessionName}" 2> /dev/null; then
+    oldTMUX="${TMUX}"
+    unset TMUX
+    tmux new -d -s "${sessionName}"
+    export TMUX="${oldTMUX}"
+    unset oldTMUX
+  fi
+  if [[ -n "${TMUX}" ]]; then
+    tmux switch-client -t "${sessionName}"
+  else
+    tmux attach -t "${sessionName}"
+  fi
 }