JuliaLang/julia

Improve apropos display

Open

#12.989 geöffnet am 6. Sept. 2015

Auf GitHub ansehen
 (5 Kommentare) (1 Reaktion) (0 zugewiesene Personen)Julia (5.773 Forks)batch import
Hacktoberfestdocsystemgood first issuehelp wanted

Repository-Metriken

Stars
 (48.709 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 20T 6h) (157 gemergte PRs in 30 T)

Beschreibung

Currently, apropos' output is quite simple — it's just the objects whose docstrings match the search text:

julia> apropos("pearson")
cov
cor

It might be nice to make this display a bit richer. We could additionally print out the first non-code documentation line to the edge of the screen, e.g.,

julia> apropos("pearson")
cov      - Compute the Pearson covariance between the vector(s) in…
cor      - Compute the Pearson correlation between the vector(s) i…

It also might be nice to make it return a Julia type that simply contains an array of objects and their documentation, so IJulia and other non-REPL programs can format it a little nicer or linkify the text for full documentation. This does have the downside of making the display non-incremental, making it feel a little slower, but it may be worth it.

The implementation is also quite simple and should be fairly simple to extend.

Contributor Guide