diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-02-05 10:28:44 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-02-05 10:28:44 -0200 |
commit | beaf867f5926725c86c670f3ed37eeab2714d0ca (patch) | |
tree | ae6cbc51306286f13173991063d64bced87b2d6f /session | |
parent | d99c8f443b385450f0d77b68cc8c14450fcf05bd (diff) | |
download | utils-x11-beaf867f5926725c86c670f3ed37eeab2714d0ca.tar.gz utils-x11-beaf867f5926725c86c670f3ed37eeab2714d0ca.tar.bz2 |
Session: decouple vim from tmux session handling
Diffstat (limited to 'session')
-rwxr-xr-x | session | 16 |
1 files changed, 5 insertions, 11 deletions
@@ -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 & |