Improve discoverability in CLI
jhrcek opened this issue · 4 comments
Today I tried the functionality via spago search CLI.
Searching for individual names works great!
But what I miss is some kind of "show everything" or "focus on one module" functionality. Use case: you remember the function you're looking for is in module XYZ, but can't remember its name. I'd like to list all functions from given module. Or maybe I'd like to just go through all names that are available in the docs to explore them.
For example in Haskell's ghci you can type these commands:
:browse - show all things loaded in the repl (just functinn/type names without associated docs)
:browse Module.Name - show list of names in given module
It would be great it this package had similar functionality in CLI :-)
Yep, we need to support hoogle-style per-module and per-package query modifiers (+Module.Name Foo, +packagename and such).
:browse
As for now, you should be able to just press the tab key when in REPL: the autocompleter will spit everything it knows.
Cool, I didn't know about the tab completion. Thanks!
Feel free to close this if you prefer
Maybe we should display some kind of help message when starting the repl listing this kind of stuff? (e.g. "press TAB to autocomplete, use +Module.Name or +packagename to query single module or single package", etc)
Or just show a Type :? for help like purs repl does and hide some help behind that.
Long repeated messages can be annoying for advanced users as I learned recently :D