Closed diniamo closed 5 months ago
What is this useful for?
If it's useful only rarely then the following can be used instead.
nix-locate -w --at-root -- "/bin/hello" | fzf | awk '{print $4}' /nix/store/l1mr8ky0gzpbp4jc7vfj6g3xp6y1z015-hello-1.0.0.2/bin/hello
Well, can it hurt to have this feature? By the time I finished the code for this, I actually forgot what I needed it for, but the main use case would be using the path in programs and scripts where providing the executable with PATH is a hassle or impossible.
I doubt nix-locate downloads the package if it's not in the store.
Hacky, but I couldn't come up with a better way, even though there probably is. Still, I think this would be a useful feature.