Add completions for ripgrep (rg).#6868
Conversation
These are roughly equivalent to the autogenerated ones but - don't need manual installation - offers correct completions `type` and `encoding` with the set of valid - has flags which take argument properly annotated.
|
I think this CI failure is unrelated. |
|
I think if the maintainers decide to merge this, the completion bundled with ripgrep should be removed there. Otherwise yours would never be loaded since |
It is. We've been testing Github Actions CI, and the mac one might possibly be even more flakey than Travis (tho we have some tests that have too strict timing requirements) |
That is up to packagers - rg doesn't actually install the completions. |
|
We used to ship rg completions, quite recently in fact. f036d01 dropped them (and the bat ones) because, as it turns out, packagers installed the completions from the rg package into /usr/share/fish/completions instead of /usr/share/fish/vendor_completions.d where they'd belong, and so the packages conflicted. (to be clear, this wasn't just a distro, but multiple) And this all took a while to get sorted out (longer than anyone liked, frankly), and in the meantime some people didn't know how to install fish (as they understandably didn't want to run their package manager with the "--ignore-file-conflicts-yes-I-know-this-could-break-stuff" option). So: I'm quite wary of starting to ship these. I think we'd have to let the pkg-config improvements start to permeate distributions first, and perhaps improve our distribution guidance. Ideally we'd just be able to coordinate with rg upstream to drop them, but I'm not entirely sure that'd work out. |
Might be worth asking. In BurntSushi/ripgrep#1543 (comment) @BurntSushi indicated it was mostly supported because it was relatively easy to add. Could be wrong though. |
|
I'd be happy to drop the fish completions from the ripgrep build. They are indeed only there because they are auto-generated by the arg parser. I have no hand in it. If they weren't auto-generated, then I definitely wouldn't be maintaining them on my own anyway. So if the fish project wants to own completions for ripgrep, then I'm more than happy with that arrangement. |
That would be great, if we can get packagers to notice, or to upgrade ripgrep and the next fish at the same time. Really this is a problem of communication, and I haven't really figured it out. We could possibly add an explicit note to the packagers to the CHANGELOG? Do they read those? |
|
Yeah, it would certainly at least be in the CHANGELOG. Another possibility is to just remove fish completions from the build output so that they can't be used, but that seems a bit harsh. We could do it in stages. In the next release, I'll add a prominent note in the CHANGELOG that fish completions will be removed in the next major release. Would that work? |
Yeah, that would work. The release after that is out, we'll then merge this one and hope packagers get the idea. |
|
Okay, it looks like these are going to stay in rg, so I'm closing. |
Description
These are roughly equivalent to the autogenerated ones but
typeandencodingwith the set of valid args.It also doesn't have
-n "__fish_use_subcommand"on each call since I'm pretty sure that's just because of howclap(a rust cli arg parsing library) autogenerates fish completions.See BurntSushi/ripgrep#1543
TODOs: