JuliaLang/julia

Improve apropos display

Open

#12 989 ouverte le 6 sept. 2015

Voir sur GitHub
 (5 commentaires) (1 réaction) (0 assignés)Julia (5 773 forks)batch import
Hacktoberfestdocsystemgood first issuehelp wanted

Métriques du dépôt

Stars
 (48 709 stars)
Métriques de merge PR
 (Merge moyen 20j 6h) (157 PRs mergées en 30 j)

Description

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.

Guide contributeur