omerxx / tmux-sessionx

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

no popup appearing #50

Closed daodejing closed 6 months ago

daodejing commented 7 months ago

Firstly nice looking plugin. It's possible I'm doing something stupid (why else would everybody else's work?), but unfortunately on my system, mac m2, I can't get the fzf-tmux popup to appear. I had a look at the args from run_plugin() { in sessionx.sh. It seems like the bind parameters need to be single-quoted for the fzf-tmux to work on my system.

eg. echo -e "mkdntask_nvim(main)" | fzf-tmux --bind 'ctrl-t:change-preview(/Users/usr0101345/.config/tmux/plugins/tmux-sessionx/scripts/preview.sh -t {1})' --bind 'ctrl-x:reload(find /Users/usr0101345/.config -mindepth 1 -maxdepth 1 -type d)+change-preview(ls {})'

works but

❮ ❮ echo -e "mkdntask_nvim(main)" | fzf-tmux --bind ctrl-t:change-preview(/Users/usr0101345/.config/tmux/plugins/tmux-sessionx/scripts/preview.sh -t {1}) --bind ctrl-x:reload(find /Users/usr0101345/.config -mindepth 1 -maxdepth 1 -type d)+change-preview(ls {})

zsh: unknown file attribute: 0

doesn't.

If the bind parameter is not single quoted, it seems zsh tries to interpret and extrapolate the bind parameter then fails.

sainad2222 commented 7 months ago

I had the same issue. Started working after updating fzf. What's your fzf version?

daodejing commented 7 months ago

thanx @sainad2222 ! After upgrading it works 😀

This was my old version:

❯ fzf --version
0.37.0 (brew)

New version:

➜ fzf --version
0.46.1 (brew)
daodejing commented 7 months ago

By the way you may want to update the README:

If you're running fzf lower than [0.35.0](https://github.com/junegunn/fzf/releases/tag/0.35.0) there

Not sure, what is the minimum supported version. It might be less hassle just to say something more general like:

Works best with new fzf.
KarateSnowMachine commented 7 months ago

By the way you may want to update the README:

If you're running fzf lower than [0.35.0](https://github.com/junegunn/fzf/releases/tag/0.35.0) there

Not sure, what is the minimum supported version. It might be less hassle just to say something more general like:

Works best with new fzf.

I also ran into this and luckily found this issue. With fzf 0.25 I could see there was a brief flash like the window came up and then immediately disappeared before I could see what was going wrong. After upgrading fzf, everything is working great.

omerxx commented 6 months ago

Hi! Happy to hear this is sorted. I'll close the issue. @daodejing I get your point, you're welcome to open a small PR with the change and we'll see what others think :)