There is a tool, ripgrep, with binary name
$ rg Command 'rg' not found, but can be installed with: sudo snap install rg # version 0.8.1, or sudo snap install ripgrep # version 0.10.0 See 'snap info <snapname>' for additional versions.
Obviously I would want the newest version, so:
$ snap install ripgrep --classic # we need --classic, apparently, don't know why ripgrep 0.10.0 from Chris MacNaughton (icey) installed $ rg --help Command 'rg' not found, but can be installed with: sudo snap install rg # version 0.8.1, or sudo snap install ripgrep # version 0.10.0 See 'snap info <snapname>' for additional versions. 08:59 ~ $ ripgrep --help Command 'ripgrep' not found, did you mean: command 'zipgrep' from deb unzip command 'sipgrep' from deb sipgrep Try: sudo apt install <deb name> 08:59 ~ $ snap run ripgrep error: cannot find app "ripgrep" in "ripgrep" $ snap run rg error: cannot find current revision for snap rg: readlink /snap/rg/current: no such file or directory $ ripgrep.rg The following required arguments were not provided: ...
So, this is, in my opinion, a fairly terrible experience, so I thought I’d give some feedback about that in the hope that someone can think about it. None of the individual parts here are wrong, but they’re all fitting together in a way that makes the whole experience confusing and unpleasant and less credible, which is a problem.
Command-not-found recommends installing the
ripgrep snap to get the
rg command, but then doesn’t give me the
rg command. (This seems to have been asked about already and then decided not to.) And there are multiple versions of ripgrep in the store, at different versions, and the one with the “canonical” binary name isn’t the most recent version. I was pretty baffled by all this, and I’m more knowledgeable than most users about snaps; I don’t think most people would have known to run it as
ripgrep.rg, for example. So the experience here is: I try to run a command, command-not-found tells me to install something to get it, I install that thing, and I still don’t have that command. I don’t know whether this is a bug in command-not-found (don’t recommend things that don’t actually provide the command I typed), the snap ecosystem overall (there are multiple things which all provide the same command), or what. But it’s not a pleasant experience. As I say, nobody is individually doing anything wrong here, but the combined effect of all this is confusing and will likely make people less confident in snaps overall.