art-w / sherlodoc

Fuzzy type search for OCaml documentation
MIT License
70 stars 6 forks source link

Facilitate current switch indexing with odig #20

Open art-w opened 7 months ago

art-w commented 7 months ago

The commands required to index the current switch with odig are a mouthful:

$ odig odoc
$ export SHERLODOC_DB=...
$ sherlodoc index $(find $OPAM_SWITCH_PREFIX/var/cache/odig/odoc -name '*.odocl')

We could probably automate with a new command sherlodoc index-odig (or just sherlodoc odig?.. or some phrasing around "current opam switch")

(... ideally the sherlodoc search command would then tap the current switch SHERLODOC_DB if the flag / env var wasn't explicitly set)