Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Help message in the completion bar, for auto-discoverable bindings
Having #utop_help;; is great, but the best help is a feature that user can discover during their normal interaction with the tool. (utop is already strong on this point thanks to the fact that, for example, typing `#` allows to discover toplevel directives.) This patch makes the key-bindings useful to navigate the completion bar auto-discoverable by printing them (right-justified) inside the bar whenever there is enough space to do so. Before: ``` utop # Ar ┌───┬────────────┬─────┬───────────┬─────────────────────────────────────────────────────────┐ │Arg│Arith_status│Array│ArrayLabels│ │ └───┴────────────┴─────┴───────────┴─────────────────────────────────────────────────────────┘ ``` After: ``` utop # Ar ┌───┬────────────┬─────┬───────────┬─────────────────────────────────────────────────────────┐ │Arg│Arith_status│Array│ArrayLabels│ (M-left, M-right, M-enter)│ └───┴────────────┴─────┴───────────┴─────────────────────────────────────────────────────────┘ ``` This patch is only a very first attempt to get this feature (in limited time). Hard-coding the precise key-bindings at the lambda-term level is certainly the wrong design choice. I suppose the help message should be configurable, and I would welcome advice on what a better interface would be.
- Loading branch information