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

setup.py is not installing ZSH completion #9231

Open
rindeal opened this issue Apr 17, 2016 · 4 comments
Open

setup.py is not installing ZSH completion #9231

rindeal opened this issue Apr 17, 2016 · 4 comments
Labels

Comments

@rindeal
Copy link

@rindeal rindeal commented Apr 17, 2016

BASH and FISH are installed ok:

youtube-dl/setup.py

Lines 50 to 51 in 1b6182d

('etc/bash_completion.d', ['youtube-dl.bash-completion']),
('etc/fish/completions', ['youtube-dl.fish']),

but ZSH is installed only via Makefile:

youtube-dl/Makefile

Lines 24 to 25 in 1b6182d

install -d $(DESTDIR)$(SHAREDIR)/zsh/site-functions
install -m 644 youtube-dl.zsh $(DESTDIR)$(SHAREDIR)/zsh/site-functions/_youtube-dl

Could you please install ZSH completion via setup.py as well?

@inondle
Copy link

@inondle inondle commented May 6, 2016

Pull request here:
#9421

@AndydeCleyre
Copy link

@AndydeCleyre AndydeCleyre commented Jun 20, 2020

I'm happy to submit a new PR. The only question I think I have is about renaming vs copying the file:

@yan12125 By the time setup.py's files_spec list is built, the completion should exist in a file with the same name as it will have once installed in the system/venv. This should be _youtube-dl. Two possible solutions:

  1. build and deploy that file as _youtube-dl throughout, eliminating youtube-dl.zsh. This is good in that it avoids any extra copying/renaming/hacks. This is bad in that it will require distribution packagers to pay attention.

  2. setup.py could include a step of copying youtube-dl.zsh -> _youtube-dl. This is good in that it avoids the need for package maintainers to change anything. This is bad in that it adds a step and copy when there's not a real need for the completion to exist with a non-install-ready name in the first place.

What do you think?

@AndydeCleyre
Copy link

@AndydeCleyre AndydeCleyre commented Jun 21, 2020

Friendly ping for @dstftw regarding the question above.

@AndydeCleyre
Copy link

@AndydeCleyre AndydeCleyre commented Jun 30, 2020

@dstftw I would like to implement this, I just want to know which of the above approaches would be most welcome.

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

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.