Skip to content

Commit 249ef40

Browse files
mkittiLilithHafner
authored andcommitted
Add hint for :help to REPL.REPLCompletions.UndefVarError_hint (JuliaLang#41754)
1 parent eea1f02 commit 249ef40

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

stdlib/REPL/src/REPLCompletions.jl

+4
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,10 @@ function UndefVarError_hint(io::IO, ex::UndefVarError)
907907
print(io, "\nsuggestion: Use `||` for short-circuiting boolean OR.")
908908
elseif var === :and
909909
print(io, "\nsuggestion: Use `&&` for short-circuiting boolean AND.")
910+
elseif var === :help
911+
println(io)
912+
# Show friendly help message when user types help or help() and help is undefined
913+
show(io, MIME("text/plain"), Base.Docs.parsedoc(Base.Docs.keywords[:help]))
910914
end
911915
end
912916

0 commit comments

Comments
 (0)