art-w / sherlodoc

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

Make the CLI interactive #30

Open EmileTrotignon opened 9 months ago

EmileTrotignon commented 9 months ago

Currently, sherlodoc's cli has two mode, single request and "toplevel".

The single request mode works as follow :

$ sherlodoc search "list map"

and return the results of the query "list map".

This is not very practical for a real user, because you need to type "sherlodoc search" over and over to make multiple request (its very good for cram tests though).

We have a "toplevel" mode that is slightly better. With the following command :

$ sherlodoc search

sherlodoc will read queries on stdin each time you press enter, and print the results.

This is not very ergonomic, and we would like something more similar to the website were the results are given on the go when you type. This requires to use some TUI framework like ncurses, because when the user adds a letter you want to remove already print result to print the new ones.

EmileTrotignon commented 9 months ago

I think this could be done with minttea