aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tmux/.local/bin
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2023-05-09 19:04:26 -0500
committerToby Vincent <tobyv13@gmail.com>2023-05-09 19:07:09 -0500
commit07fd3c3efbe9b7c8e7c9846f8c7d49a361645182 (patch)
tree0460dfb039e161a50813e6126ae250cb7b768b81 /tmux/.local/bin
parentef1962bdf424813a2a82dbf9e55c1348c6016d0c (diff)
fix(tmux): fix bug in tmux-sessions
Diffstat (limited to 'tmux/.local/bin')
-rwxr-xr-xtmux/.local/bin/tmux-sessions6
1 files changed, 5 insertions, 1 deletions
diff --git a/tmux/.local/bin/tmux-sessions b/tmux/.local/bin/tmux-sessions
index c9333dc..8a7a458 100755
--- a/tmux/.local/bin/tmux-sessions
+++ b/tmux/.local/bin/tmux-sessions
@@ -8,10 +8,14 @@ if [ "$#" -eq 0 ]; then
$FZF_CMD |
fzf-tmux "$FZF_TMUX_OPTS" -- --tac --select-1 --exit-0 \
--bind "ctrl-q:execute(tmux kill-session -t{})+reload($FZF_CMD)" \
- --preview-window=right,80% --preview='tmux capture-pane -ep -t {}'
+ --preview-window=right,80% --preview='tmux capture-pane -ep -t{}:'
)
fi
+if [ "$#" -eq 0 ]; then
+ exit 0
+fi
+
if [ -z "$TMUX" ]; then
tmux attach-session -t "$1"
else