inline-help
| (require inline-help) | package: inline-help |
Terminal documentation for Racket. When working on a remote machine or in a terminal without a browser, Racket’s built-in help is useless because it tries to open HTML docs in a web browser. inline-help provides a doc macro that renders documentation directly in the REPL with ANSI formatting.
1 Quick Start
Install the package:
raco pkg install inline-help
Then in the REPL:
(require inline-help) (doc map) (doc define) (doc string-join)
2 API Reference
(doc id) —
Looks up id in the racket module, which covers everything available in a standard #lang racket REPL. (doc id #:from module-path) —
Looks up id as provided by module-path. Use this when the identifier comes from a specific library, e.g. (doc second #:from racket/list). (doc str) —
When given a string literal, searches the documentation index. (Not yet implemented.)
The output includes:
The identifier name and providing module
The kind (procedure, syntax, value, struct, etc.)
The full signature from the blue box
The prose description from the HTML documentation
Output uses ANSI formatting (bold, color) when the terminal supports it, and falls back to plain text when TERM is dumb or unset.
procedure
sym : symbol? mod : (or/c #f module-path?)
If the identifier is not found, prints a “not found” message.
3 Environment
TERM —
When set to dumb or unset, ANSI colors are disabled. Any other value enables color output. COLUMNS —
Sets the terminal width for word wrapping. Defaults to 80 if unset.