Add basic help "command" to InteractiveUtils#41749
Closed
mkitti wants to merge 3 commits intoJuliaLang:masterfrom
Closed
Add basic help "command" to InteractiveUtils#41749mkitti wants to merge 3 commits intoJuliaLang:masterfrom
mkitti wants to merge 3 commits intoJuliaLang:masterfrom
Conversation
ericphanson
reviewed
Aug 1, 2021
mkitti
commented
Aug 1, 2021
Simplify code, use `@doc`
Contributor
|
I think a NEWS entry would be good, since that's one more exported-by-default identifier. |
Member
|
In previous discussions, I think we've said that it would be better to implement this kind of thing in the |
Contributor
Author
|
Closing due to merge of #41754, which shows the error and does not define a help symbol. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add basic help "command" to InteractiveUtils
Typing "help" into an interactive command line program is an intuitive step to take when working with a new program. This pull request creates a "help" command by creating a singleton
Helpobject in InteractiveUtils and a constant instancehelp.While this has some redundancy with
?(mentioned in the banner) and@doc, the redundancy is worthwhile to make Julia user friendly and assists the users when the banner may not be visible after executing several commands.Background
Julia before this pull request
Currently, typing "help" into the Julia REPL results in an error message.
Pkg help
In contrast, the Pkg mode:
Python
Compare this to Python/ipython:
R
While
Base.banner()does direct users to?Implementation Notes
Helpstruct.Base.showis implemented forHelpby showing the result ofBase.Docs.parsedoc(Base.Docs.keywords[:help])@doc(help)seems to fail@doc.