Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve discoverability in CLI #25

Open
jhrcek opened this issue Oct 2, 2019 · 4 comments
Open

Improve discoverability in CLI #25

jhrcek opened this issue Oct 2, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@jhrcek
Copy link

jhrcek commented Oct 2, 2019

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 :-)

@klntsky
Copy link
Collaborator

klntsky commented Oct 2, 2019

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.

@jhrcek
Copy link
Author

jhrcek commented Oct 2, 2019

Cool, I didn't know about the tab completion. Thanks!
Feel free to close this if you prefer

@f-f
Copy link
Member

f-f commented Oct 2, 2019

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)

@jhrcek
Copy link
Author

jhrcek commented Oct 2, 2019

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

@klntsky klntsky added the enhancement New feature or request label Aug 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants