tmux-sessionx icon indicating copy to clipboard operation
tmux-sessionx copied to clipboard

Bug: Current session name shows as empty string in border label

Open av1155 opened this issue 6 months ago • 3 comments

Description

When using SessionX, the border label displays Current session: "" with an empty string instead of showing the actual current session name.

Expected Behavior

The border label should display: Current session: "main" (or whatever the actual session name is)

Actual Behavior

The border label displays: Current session: "" with empty quotes

Root Cause

In sessionx.tmux line 136, the border label references $CURRENT:

args+=(--border-label "Current session: \"$CURRENT\" ")

However, the $CURRENT variable is never defined in sessionx.tmux. It's only defined in scripts/sessionx.sh line 4, but that script runs separately when the keybind is pressed, so the variable is not available in the sessionx.tmux context.

Suggested Fix

Add the following line near the top of sessionx.tmux (after line 4):

CURRENT="\$(tmux display-message -p '#S')"

This would define $CURRENT in the same way it's defined in sessionx.sh.

Environment

  • tmux version: 3.5a
  • SessionX version: latest (from TPM)
  • OS: macOS Sequoia 15.6.1 arm64
  • fzf version: (using fzf-builtin-tmux mode)

Notes

  • The session list itself works correctly and shows the current session with the pointer (▶ main)
  • The $TMUX_SESSION environment variable is set correctly in the shell
  • This is purely a cosmetic issue in the border label display
  • Functionality is not impacted - just the header display

Screenshot

Image

Shows Current session: "" in the border label

av1155 avatar Oct 15 '25 01:10 av1155

I see this too.

aspiers avatar Oct 19 '25 11:10 aspiers

Ah, is it a duplicate of #175?

aspiers avatar Oct 19 '25 11:10 aspiers

I believe so @aspiers

av1155 avatar Oct 22 '25 04:10 av1155