From 7770a95fbd395e7ddcdab2c8d1092a39dd2d9f2c Mon Sep 17 00:00:00 2001 From: Ollie Date: Wed, 13 May 2026 06:45:34 +0000 Subject: [PATCH] fix: use session: target syntax in list-panes to avoid numeric name ambiguity --- src/socket_test.go | 4 ++-- src/state.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/socket_test.go b/src/socket_test.go index e5c2a85..887b00e 100644 --- a/src/socket_test.go +++ b/src/socket_test.go @@ -730,9 +730,9 @@ func TestListSessionsOnSocketAllPanes(t *testing.T) { return "alpha\nbeta", nil case "list-panes": switch args[2] { - case "alpha": + case "alpha:": return "%1\n%3", nil - case "beta": + case "beta:": return "%7", nil default: return "", errors.New("unexpected session") diff --git a/src/state.go b/src/state.go index 0d89ee5..34bd82c 100644 --- a/src/state.go +++ b/src/state.go @@ -244,7 +244,7 @@ func listSessionsOnSocket(ctx context.Context, cfg config, target socketTarget) } func listPaneIDs(ctx context.Context, cfg config, socketPath string, session string) ([]string, error) { - out, err := runTmuxOnSocketFn(ctx, cfg, socketPath, "list-panes", "-t", session, "-F", "#{pane_id}") + out, err := runTmuxOnSocketFn(ctx, cfg, socketPath, "list-panes", "-t", session+":", "-F", "#{pane_id}") if err != nil { return nil, err } @@ -269,7 +269,7 @@ func listPaneIDs(ctx context.Context, cfg config, socketPath string, session str } func activePaneID(ctx context.Context, cfg config, socketPath string, session string) (string, error) { - out, err := runTmuxOnSocketFn(ctx, cfg, socketPath, "list-panes", "-t", session, "-F", "#{pane_active} #{pane_id}") + out, err := runTmuxOnSocketFn(ctx, cfg, socketPath, "list-panes", "-t", session+":", "-F", "#{pane_active} #{pane_id}") if err != nil { return "", err }