Adds snippets to nvim

This commit is contained in:
Michael Housh
2023-10-01 19:21:06 -04:00
parent e8772df72e
commit 19229a2b90
6 changed files with 25 additions and 13 deletions

View File

@@ -3,12 +3,8 @@
session=${1}
if [ -z "$session" ]; then
session=$(tmux list-sessions -F \#S | gum filter --placeholder "Pick a session...")
tmux switch-client -t "$session" || tmux attach -t "$session"
choice=$(tmux list-sessions -F \#S | gum filter --placeholder "Pick a session...")
tmux switch-client -t "$choice" || tmux attach -t "$choice"
else
if [ ! -z "$(tmux list-sessions -F \#S | grep $session)" ]; then
tmux switch-client -t "$session" || tmux attach -t "$session"
else
echo "No session found for: $session"
fi
tmux switch-client -t "$session" || tmux attach -t "$session"
fi