Search functions in noogle.dev
Bro literally assigned me what
@viperML what kind of an interface did you envision for this? I've started looking at such a feature, but I'm a little unsure how to add it. nh search strikes me as the most suitable candidate, however, nh search --target <nixpkgs | noogle> is probably a downgrade in terms of UX.
I'm not sure, though I can throw in some options:
- Search everything by default, merging the results and filtering with --pkg or --function.
- Search packages by default, explictely pass -f/--function to search noogle.
The latter is probably better UX and less backwards-incompatible. I was thinking of searching for packages by default (since that's what nix search does) and do something like --module, --function, etc. for other "providers".
On that note, I have plans to build an indexed database like nix-index, but more comprehensive and extensible. I'm sure we could think a bit more about this while I work on that.