Dvc.org: install: zsh autocomplete instructions don't work on MacOS

Created on 28 Oct 2019  路  10Comments  路  Source: iterative/dvc.org

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.

doc-content enhancement

All 10 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jorgeorpinel picture jorgeorpinel  路  3Comments

efiop picture efiop  路  3Comments

jorgeorpinel picture jorgeorpinel  路  3Comments

elleobrien picture elleobrien  路  4Comments

utkarshsingh99 picture utkarshsingh99  路  3Comments