Closed dnguyenzd closed 1 year ago
Hm, that's weird. Could you try to run tmux-modal.tmux in a tmux session manually? I.e. in tmux do
./tmux-modal.tmux
I got this error when executing it directly:
/tmux-modal.tmux: line 27: syntax error near unexpected token `&'
look like this is one of those special cases of list-keys
that the script misses to handle. I attached here the output of tmux list-keys
for reference
Ah no, this is bash reporting a syntax error. I think you are using a too old bash version. Could you report what
bash --version
says? I'm guessing that you are using version older than 4.0. That syntax was introduced in bash 4.0 (which is more than 10 years ago...).
you are right, I'm using default bash version from MacOS, which is 3.2.57 using latest bash from brew fixes it
it might be worth mentioning bash version requirement as prerequisite though because as I know, Apple will not ship newer version of bash due to licensing, so a lot of people have version 3 by default
Aha interesting! We would like MacOS users to use this plugin without any hassles of course. Maybe the switch-case can be rewritten to be portable?
For now, I'll add a check for bash version. Thank you!
@dnguyenzd - I was able to get this working on a mac. I ran to use the brew installed version of bash which refd bash 5.x
brew link --overwrite bash
Just make sure it is the winner in your PATH
resolution.
I tried installing using
tpm
, and I can seetmux-modal
folder in~/.tmux/plugins
, howeverM-m
doesn't do anything. Other plugins installed withtpm
are working fineWhen I do
tmux list-keys -T root
, it doesn't have any keys registered bytmux-modal
I also tried putting
run '~/.tmux/plugins/tmux-modal/tmux-modal.tmux'
at the end of my.tmux.conf
file but it's not working either