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

Incorrect macOS zsh/site-functions Directory to Install Completions #311

Open
lace-wing opened this issue Mar 9, 2024 · 0 comments
Open

Comments

@lace-wing
Copy link

Description

With nb completions install --download, nb tries to install zsh completions into /usr/share/zsh/site-functions/. This should work, except on macOS, that folder is protected by the system and not even sudo can grant user/group write permission to it.

nb completions install -d outputs as follows

! Exists: /opt/homebrew/Cellar/bash-completion@2/2.12.0/share/bash-completion/completions/nb
! Exists: /opt/homebrew/Cellar/fish/3.7.0/share/fish/vendor_completions.d/nb.fish
! Permission denied: /usr/share/zsh/site-functions

Repro

Run sudo nb completions install -d on a version of macOS, which zsh has been its default shell and homebrew has been installed.

Solution

One could use their own zsh/site-functions/ directory.

For instance, brew give it to /opt/homebrew/share/zsh/site-functions/. nb should install zsh completion scripts to such location. Other zsh completions there has been working well.

Alternatives

Since completions for other 2 shells has been installed to their correct brew directories, I believe the Solution is viable and there's no better/simpler approach.

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

1 participant