aboutsummaryrefslogtreecommitdiff
path: root/session
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-02-05 10:28:44 -0200
committerSilvio Rhatto <rhatto@riseup.net>2018-02-05 10:28:44 -0200
commitbeaf867f5926725c86c670f3ed37eeab2714d0ca (patch)
treeae6cbc51306286f13173991063d64bced87b2d6f /session
parentd99c8f443b385450f0d77b68cc8c14450fcf05bd (diff)
downloadutils-x11-beaf867f5926725c86c670f3ed37eeab2714d0ca.tar.gz
utils-x11-beaf867f5926725c86c670f3ed37eeab2714d0ca.tar.bz2
Session: decouple vim from tmux session handling
Diffstat (limited to 'session')
-rwxr-xr-xsession16
1 files changed, 5 insertions, 11 deletions
diff --git a/session b/session
index ce32171..d18da1b 100755
--- a/session
+++ b/session
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Open a VIM + tmux session
+# Open a work session, which might consist on VIM, tmux, etc sessions.
#
# Parameters
@@ -14,17 +14,11 @@ if [ -z "$SESSION" ]; then
fi
# Check VIM session
-if [ ! -e "$HOME/.local/share/vim/sessions/$SESSION.vim" ]; then
- echo "$BASENAME: no such vim session $SESSION"
- exit 1
+if [ -e "$HOME/.local/share/vim/sessions/$SESSION.vim" ]; then
+ terminal vim -S $HOME/.local/share/vim/sessions/$SESSION.vim &
fi
# Check tmux session
-if [ ! -e "$HOME/.tmux/$SESSION" ]; then
- echo "$BASENAME: no such tmux session $SESSION"
- exit 1
+if [ -e "$HOME/.tmux/$SESSION" ]; then
+ terminal shell $SESSION &
fi
-
-# Dispatch
-terminal shell $SESSION &
-terminal vim -S $HOME/.local/share/vim/sessions/$SESSION.vim &