sainnhe / tmux-fzf

Use fzf to manage your tmux work environment!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Show the current session/window/pane when switching

FrostyX opened this issue · comments

For some reason, I cannot see the current session, window, and pane when switching. I am not sure whether it is a bug or a feature but it is IMHO very unpleasant.

  • For a second I always panic that I accidentally killed some session
  • Sometimes my hands are faster than my thinking and I start switching into a session without realizing that I am currently in it. Then I am confused why it isn't there
  • The main benefit of fzf is filtering a large number of results with ease, so one less result doesn't make a dent

If this is a feature, can we have have a config variable to optionally show current thing in the fzf items, please?

Do you mean preview the content? It’s already supported and enable by default.

Thank you for the reply @sainnhe,
It will be probably the easiest to show you.

Here, you can see the list of all my Tmux sessions. The currently attached session is named fedora-review.

Screenshot_2024-03-07_15-05-22

Here I am running ~/.tmux/plugins/tmux-fzf/scripts/session.sh switch

Screenshot_2024-03-07_15-06-05

As you can see, all the sessions are listed except for the fedora-review.

It’s expected. Since the action is “switch”, the current session is excluded in the list.

Oh, so it is a feature. Can we optionally have the current session/window/etc included in the list, please? This wouldn't be unprecedented ... FZF plugin in Vim also lists the current buffer among the possible buffers to switch. Same for narrowing frameworks in Emacs, etc.

PR is welcome.

PR is welcome.

Perfect, thank you :-)
I submitted PR #79