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

Fix for empty list on Mac OSX #8

Closed
haqthat opened this issue Feb 5, 2024 · 2 comments
Closed

Fix for empty list on Mac OSX #8

haqthat opened this issue Feb 5, 2024 · 2 comments

Comments

@haqthat
Copy link

haqthat commented Feb 5, 2024

I came across this project from a Youtube video, and was excited to try it.
Unfortunately running it on my Mac "works" but I end up with an empty list when you go to choose a distro.

I looked into it, and there are a couple things needed that make it work for Mac, maybe the script could be updated to accommodate us.

By default new versions of OSX use the zsh shell, and porting this app over to handle both zsh and bash would be a little painful, I tried.

The only real issue is the version of bash that is on OSX these days is quite old since the default is changed to zsh.

It's quite easy to fix though.
If you have brew installed, you can just

brew install bash

Which will upgrade/add an alternate bash from a 3.x version to a 5.x version.

bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin23

brew install bash

/usr/local/bin/bash --version
GNU bash, version 5.2.26(1)-release (x86_64-apple-darwin23.2.0)

Then the only thing that needs changed is the shebang in the script "nvims".

from #!/bin/bash to #!/usr/local/bin/env bash

The system default bash won't be changed, but we have a newer version in /usr/local/bin/bash that is newer and can handle the way the array handling is setup in nvims.

You could make a check to see if bash is old, and warn them that the might need to upgrade, or just provide additional requirements in the readme for Mac users.

TLDR:

brew install bash
echo /usr/local/bin/bash | sudo tee -a /etc/shells
sed -i '1 s/^.*$/\#\!\/usr\/local\/bin\/env bash/' /usr/local/bin/nvims

You'll need sudo to edit nvims with sed.

Should fix issue #3 and #6

Traap added a commit that referenced this issue Feb 7, 2024
@Traap
Copy link
Owner

Traap commented Feb 7, 2024

@haqthat Thank you for the tips and detailed notes. I added an OSX section to the README and linked it to this topic.

@Traap Traap closed this as completed Feb 7, 2024
@Traap Traap reopened this Feb 7, 2024
@Traap
Copy link
Owner

Traap commented Feb 29, 2024

Linked this topic to README.

@Traap Traap closed this as completed Feb 29, 2024
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

2 participants