Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Update bash-completion support #804
Comments
|
Mmm, I'm not sure how to rename the file in |
|
I have no idea how this setup.py stuff works. The only thing I can think of, which works, is to put the file in a sub-directory (maybe naming it completions) so it wouldn't conflict with the binary in the main directory.. |
|
What are the permissions on that folder? Because I'm not that fond of making ytdl only installable via sudo. |
|
What is the adoption for this new version? On my box I'm still in etc
|
|
The /usr/share/bash-completion/ folder is 755 for root. I believe it's also the case for the old location (/etc/bash_completion.d) so it won't be affected by this change. BTW, according to the FAQ in the README, you can put completions in ~/.bash_completion, which is parsed at the end of the main completion script. As I said in my initial post, the layout change was done in bash-completion 1.90. The current version is 2.1 although the source tarball seems to have disappearedfrom alioth.debian.org. You're probaly still using an old version. |
|
Ok, my two points are that first, if a large chunk of users are still Actually, I thought that that approach was broken (maybe for Filippo Valsorda 2013/11/22 EricBelanger notifications@github.com:
|
|
As 1.9 was released 2 years ago and the stable 2.0 was released 17 months ago, I thought most distro would be using the bash-completion with the new layout. I seems that it's not the case (I presume you are using Debian). The new bash-completion has a compatibility mode where it also look in /etc/bash_completion.d for for completions so the current installation of the youtube-dl completion works with the newer versions. Therefore, you can keep this bug open as a reminder and wait for either wider usage of the new bash-completion layout or until that compat mode is removed (if that happens) before before changing the current behavior. The location change consist of just replacing etc/bash_completion.d by share/bash-completion/completions in setup.py. So the completion will be in the same 'share' directory tree as the man page and README.txt file so the use of sudo won't be necessarry if the installation is done in a non-system directory. |
|
I think wide adoption of bash-completion 1.90+ can now be assumed. I actually came here wanting to make a PR, Update: For local install I used |
Since bash-completion 1.90 (released in Nov 2011), there has been a layout change: everything is now in /usr/share/bash-completion/, rather than in /etc/. Also, the completion must have the same name as the binary.
Therefore, the completion should now be installed as:
/usr/share/bash-completion/completions/youtube-dl
Thanks