Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix help for .+ in the REPL #8922

Closed
wants to merge 1 commit into from
Closed

Fix help for .+ in the REPL #8922

wants to merge 1 commit into from

Conversation

hayd
Copy link
Member

@hayd hayd commented Nov 6, 2014

fixes #8903.

There is a slight oddity here (though not sure if this is related), this changes the current help e.g. for add:

julia> eval(parse("Base.@help(add)"))   # current help
add (generic function with 2 methods)

julia> eval(parse("Base.@help(\"add\")"))  # this PR
Base.Pkg.add(pkg, vers...)

   Add a requirement entry for "pkg" to "Pkg.dir("REQUIRE")" and
   call "Pkg.resolve()". If "vers" are given, they must be
   "VersionNumber" objects and they specify acceptable version
   intervals for "pkg".

(Note: Not sure how this small change fits in with docile/md upheaval #8588 #8791?)

@ivarne ivarne added the domain:docs This change adds or pertains to documentation label Nov 7, 2014
mbauman added a commit to mbauman/julia that referenced this pull request Nov 22, 2014
This fixes JuliaLang#8903 and supersedes JuliaLang#8922 (cc @hayd). Basically, when you pass a function to the help system (instead of just its name), the system can go through all the modules and only returns those methods that actually extend the same function.  The way it does this, however, is a little hacky... using string concatenation to combine the function name with the module names, and then splitting it back apart again on dots to get the functions within each module.  This simply improves the splitting logic with a regex to handle the leading dot.
@nolta
Copy link
Member

nolta commented Nov 25, 2014

Thanks @hayd. I decided to go with #9109 instead.

@nolta nolta closed this Nov 25, 2014
ivarne pushed a commit that referenced this pull request Dec 4, 2014
This fixes #8903 and supersedes #8922 (cc @hayd). Basically, when you pass a function to the help system (instead of just its name), the system can go through all the modules and only returns those methods that actually extend the same function.  The way it does this, however, is a little hacky... using string concatenation to combine the function name with the module names, and then splitting it back apart again on dots to get the functions within each module.  This simply improves the splitting logic with a regex to handle the leading dot.

(cherry picked from commit 5671381)
Ref: #9109
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

help for .+ (is not defined)
3 participants