sudo wget \
-O /usr/share/zsh/site-functions/_dvc \
https://raw.githubusercontent.com/iterative/dvc/master/scripts/completion/dvc.zsh
Password: [captured]
/usr/share/zsh/site-functions/_dvc: Operation not permitted
Unfortunately this may be hard to force. See https://serverfault.com/a/748845/296107.
There should be probably alternative ways of installing this. @mroutis could you take a look please when you have a few minutes?
@efiop how do we install it when we ship the package? what location and how do we overcome the Mac OS restrictions?
@shcheklein We don't do anything about it ourselves. Brew is doing that automatically. There might be another location where you could put those scripts per-user, need to research.
@jorgeorpinel so, the easiest way is to install via brew and see where do these files go.
It's installed in /usr/local/Cellar/dvc/0.65.0/ for me rn. Completion scripts seem to be placed in /usr/local/Cellar/dvc/0.65.0/etc/bash_completion.d/dvc and /usr/local/Cellar/dvc/0.65.0/share/zsh/site-functions/dvc.zsh (I use the latter, Zsh).
I'm not sure how they're hooked to the shell by Homebrew though.
completion def does not work for brew installed package for me (bash).
@shcheklein the issue is unlikely on our package side, as we do the same thing that any other package does in regards to installing completion scripts. I imagine they are not activated or something on your side.
@efiop it can also probably just mean that either brew does not install completions (it's up to a user to run something after that), it might potentially just deliver scripts
@efiop @jorgeorpinel https://docs.brew.sh/Shell-Completion - this is the instruction how to enable them properly for brew installed packages. I'm not sure about apt-get. I also think that a similar instruction can be provided instead the one we have when someone wants to install it manually.
I think it should be fixed now.