aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 &