-
Notifications
You must be signed in to change notification settings - Fork 6
Home
The Github documentation for gonsole is not a fully exhaustive list of what you can do, because I judge the code to be well documented for the most part. I might be wrong though. However and consequently, this documentation is more of a step-by-step tutorial on how to get the most out of the library, and trying to take into account some edge cases as well.
Also, parts of the documentation or some of its pictures are identical/similar to what you'll find in the readline. However you should not use readline's documentation and apply it to this library, because there are subtle differences even in little places ("populating completions" documentation is a good example of why you should not do this).
At this point you should have an editor with a single line from this library (drop your example if you come from the README):
var console = gonsole.NewConsole()
This variable could be global or not, it's up to you. In the rest of the documentation we'll act as if it was, but there really are many possibilities of passing it here and there. You know Go.
As usual, I suggest to read the documentation (1) in order, (2) recompiling and testing your project regularly. And this for 2 reasons: catch your bugs quick, or notify me quick: this library works quite bug-free as compared to its feature set, but it has not been tested out by tens of persons. The list of files is given in a structured way below if you need a bit of code summary. You might find that the documentation is quite long for an "easy-to-use" console library. Don't be fooled by the length: once you get it, it should be blazingly fast and easy to use.
* Menus
[Different Menus](https://github.com/maxlandon/gonsole/wiki/Menus#different-menus)
[The Default Menu](https://github.com/maxlandon/gonsole/wiki/Menus#the-default-menu)
[Creating Menus](https://github.com/maxlandon/gonsole/wiki/Menus#creating-menus)
[Switching between Menus](https://github.com/maxlandon/gonsole/wiki/Menus#switching-between-menus)
- Configurations Overview
- Setting Prompts & Input Modes
- Default commands
- Declaring commands
- Querying state from commands
- Completions (writing and binding)
- Additional expansion completions
- History sources and declaration
- Prompt Refresh methods