Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work on Mac #3

Open
matthewtusker opened this issue Apr 13, 2023 · 2 comments
Open

Doesn't work on Mac #3

matthewtusker opened this issue Apr 13, 2023 · 2 comments

Comments

@matthewtusker
Copy link

matthewtusker commented Apr 13, 2023

My work Mac doesn't like this plugin:

❯ ~/.tmux/plugins/tmux-autoreload/tmux-autoreload.tmux -s
/Users/person/.tmux/plugins/tmux-autoreload/tmux-autoreload.tmux: line 22: declare: -g: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]

It seems that -g for declare isn't available on Mac, as it uses Bash 3.2 (and -g is only available at some point in version 4. It's possible to use a newer version through Brew, but also requires playing around with files in /etc and this is a work machine that I really don't want to get to custom with.

Is there a way to modify this plugin to work with Bash 3.2? I'm guessing that some other lines won't work on such an old version of Bash...

EDIT: I've managed to get the plugin working but I've had to change the first line to #!/opt/homebrew/bin/bash and remove the -e argument from realpath. I don't suppose it's worth your time to make any changes, but I may not be the only Mac user that might want this plugin to work. If I have some time I'll have another look at this, and I'll create a PR if I'm successful.

@elbouillon
Copy link

elbouillon commented Aug 14, 2023

fix works fine, thanks!

lamchau added a commit to lamchau/tmux-autoreload that referenced this issue Dec 6, 2023
@Ahg4goo9
Copy link

I want to add here that because of the declare -g it also requires bash 4+. MacOS is coming with a 3.2, so that is also something that should maybe be noted somewhere :-).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants