omerxx / tmux-sessionx

A Tmux session manager, with preview, fuzzy finding, and MORE
GNU General Public License v3.0
565 stars 51 forks source link

Session missing in the list #10

Closed invisible1988 closed 7 months ago

invisible1988 commented 7 months ago

I have two sessions with similar names. One of them is missing from the list. (see screenshots)

tmux-sessionx image

Default Session Viewer image

I'm in the session trusted-cms. The session trusted-cms-webdav is missing.

omerxx commented 7 months ago

Hey @invisible1988 , is it possible that it's missing because this is the current session? See the title of the popup. If this is the case I'm trying to figure out a non confusing functionality - see #8 (https://github.com/omerxx/tmux-sessionx/issues/8#issuecomment-1850483354)

invisible1988 commented 7 months ago

Okay, I think I know how the bug appears now. I have two sessions:

When I'm in trusted-cms, the trusted-cms-webdav session also disappears.

I like the feature to hide the current session, but there seems to be a bug in detecting which session I'm in.

invisible1988 commented 7 months ago

https://github.com/omerxx/tmux-sessionx/blob/d71e51b4be2e94ca5d92f5f8afcc190ac56980f1/scripts/sessionx.sh#L6 #

I think this should fix it.

(tmux list-sessions | sed -E 's/:.*$//' | grep -v "$CURRENT$") || echo "$CURRENT"
omerxx commented 7 months ago

@invisible1988 You're perfectly right. I can push the fix or you can open a PR up to you :) Thanks!

invisible1988 commented 7 months ago

Thanks a lot! Love your extension.