about summary refs log tree commit diff
path: root/functions
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2016-12-01T23·29-0500
committerWilliam Carroll <wpcarro@gmail.com>2016-12-01T23·29-0500
commitdded5d649715f00f510bdf53470fe7a8ce6da293 (patch)
treeed8d81aa4455c344df383ba6fbf24e72f6aec3a7 /functions
parent7d5ad2b2b99a3a27a971320be7f21054cb920b4a (diff)
Adds elixir support; extends tmux config; adds vim viewport key-bindings
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
 }