JuliaLang/julia

Improve apropos display

Open

#12,989 创建于 2015年9月6日

在 GitHub 查看
 (5 评论) (1 反应) (0 负责人)Julia (48,709 star) (5,773 fork)batch import
Hacktoberfestdocsystemgood first issuehelp wanted

描述

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.

贡献者指南

Improve apropos display · JuliaLang/julia#12989 | Good First Issue