diff options
author | Toby Vincent <tobyv13@gmail.com> | 2023-05-09 19:04:26 -0500 |
---|---|---|
committer | Toby Vincent <tobyv13@gmail.com> | 2023-05-09 19:07:09 -0500 |
commit | 07fd3c3efbe9b7c8e7c9846f8c7d49a361645182 (patch) | |
tree | 0460dfb039e161a50813e6126ae250cb7b768b81 /tmux/.local/bin | |
parent | ef1962bdf424813a2a82dbf9e55c1348c6016d0c (diff) |
fix(tmux): fix bug in tmux-sessions
Diffstat (limited to 'tmux/.local/bin')
-rwxr-xr-x | tmux/.local/bin/tmux-sessions | 6 |
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 |