Skip to content

Commit

Permalink
fix: tmux: ignore session without id, add missing name
Browse files Browse the repository at this point in the history
It's very unlikely do happen.
  • Loading branch information
KarolBedkowski committed Nov 26, 2023
1 parent e099576 commit 6e20358
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions kupfer/plugin/tmux.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,16 @@ def tmux_sessions(
if libtmux:
if srv := libtmux.Server(): # type: ignore
for sess in srv.sessions:
if not sess.session_id:
continue

yield (
sess.session_id,
sess.session_name,
sess.session_attached,
sess.session_created,
sess.session_name or f"session {sess.session_id}",
sess.session_attached or "",
sess.session_created or "",
)

return

# fallback
Expand Down

0 comments on commit 6e20358

Please sign in to comment.