Added go.nvim, updated ts script to accept a session argument

This commit is contained in:
Michael Housh
2023-10-01 11:28:24 -04:00
parent 7c5c642ae5
commit 660ff7d94d
9 changed files with 52 additions and 11 deletions

View File

@@ -1,4 +1,14 @@
#!/bin/sh
session=$(tmux list-sessions -F \#S | gum filter --placeholder "Pick a session...")
tmux switch-client -t "$session" || tmux attach -t "$session"
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"
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
fi