-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Ripgrep completions are in conflict with completions provided by ripgrep itself #5822
Comments
The AUR package is my concern, the fish devs will not do anything with it. |
Sooo....
|
User-provided or package-provided completions should not be installed to the fish installation directory, there's a separate directory for that. |
@faho ripgrep installation instructions are to manually copy the completions to the shell-specific user-local completions directory. A lot of our completions are also available via other means (e.g. pip, kitty, and others) but made more accessible by fish. This isn't new, AUR is to blame here. Rust developers (which is the community rg came out of) installation ripgrep via |
Not really. The "AUR" package in question is the fish-git package, which just installs fish. The ripgrep package, which installs the completions into our directory, is in the official arch repo. Though TBH I'd just drop these completions and be done with it - it's not like they're particularly sophisticated. The autogenerated completions aren't much worse. |
It is true that the ripgrep Archlinux package explicitely installs the completions to |
Probably they should go in |
I staunchly disagree with @faho on this. |
Is it worth dying on this hill? The completion is a tad better than the autogenerated one, it's installed already in at least some distributions via upstream, so removing it just makes our lives easier. |
In this case it's easy - it's for the distribution, so it should just hardcode that path instead of /usr/share/fish/completions/. |
Not for the |
cc @svenstaro. |
So hang on, all in all, what are distribution maintainers supposed to do? I'm supposed to change the installation path in the rg package to install to the vendor path, right? |
@svenstaro: Exactly. Use /usr/share/fish/vendor_completions.d, not /usr/share/fish/completions. |
Okay, since we're apparently not going to do anything, let's close this and see if everything works out alright. |
I actually think this is the package manager's job to look after. Distribution maintainers faced with conflicting files in any packages should manage this in the way they would any other conflict - patch one of the packages, or use the tools that the distribution provides (eg alternatives, diversions on Debian) to manage the problem. |
Same thing today with the new rustup completions shipped in 85f93ff .
|
I had this same issue, found it mentioned in the Gitter chat. This is what fixed it for me: |
Yup. On the Ubuntu side, as of today 13 February 2020, the fish PPA package conflicts (at least) with the completions provided by: Should we file issues for each? |
Distributions should prefer the completion script provided by fish. |
@krobelus distributions will do their job and do the right thing in their ecosystem, ensuring no conflict happens in the virtual tree of the union of all their packages. But here I'm asking how to solve the conflicts between PPA packages & "Early, directly from authors" deb packages like the {bat, ripgrep} examples I shared above. I'll be happy to file bat & ripgrep issues and offer a suggestion, but I'd like a confirmation and I'm not even sure what to suggest:
|
Yes,
Not sure about this, probably not anytime soon (since old fish versions will be around for some time). |
This is probably a bad idea, at least in the general case. It's easier to keep, say, On the other hand, FreeBSD's Here's another way to think of the problem. Imagine you're a person who likes using a program called |
This is not the case; I would like to encourage more developers to write and ship fish completions! The problem is that completions shipped with (say) I'm tempted to drop our |
I agree. We don't have a good workaround to offer those who meet conflicted packages (forcing overwrites isn't one), so we should drop them at least until they've been moved to the proper location by distribution packagers. There are four groups of people affected by this.
Frankly the fourth group is affected much worse than the third, so we should drop the completions. (personally I've also said that I wouldn't ship upstream completions like the rg ones to begin with, but that's a different discussion) |
Whoops, my bad; my train of thought was that sometimes a package simply includes auto-generated fish completions (for example from Anyway, dropping them from 3.1.1 is a good idea imo; eventually packages should be using |
Note that rg just did that ( BurntSushi/ripgrep#1485 + BurntSushi/ripgrep@01eeec5 ), and bat is about to do it too; sharkdp/bat#651 (comment) |
In the interim, the following workaround commands are useful:
|
These are shipped upstream. Closes #5822.
Since 5989a92 by @mqudsi, building the
fish-git
AUR package succeeds, but installation fails with:I'm filing this issue but I'm uncertain who's "right" and who should be providing these completions:
package()
a littlerm "$pkgdir/usr/share/fish/completions/rg.fish"
Anyway, you already provide tons of completions, so I guess you already know what's the right thing to do here. So, feedback welcome, I'll pass it on to AUR packagers.
As usual, thanks a million for fish!
The text was updated successfully, but these errors were encountered: