# We should offer ?REPL in the REPL

**URL:** <https://discourse.julialang.org/t/we-should-offer-repl-in-the-repl/3116>\
**Category:** Internals & Design\
**Created:** [April 8, 2017, 10:58am UTC](https://discourse.julialang.org/t/we-should-offer-repl-in-the-repl/3116 "2017-04-08T10:58:03Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![JeffreySarnoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeffreysarnoff/32/1980_2.png) [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Post date:** [April 8, 2017, 10:58am UTC](https://discourse.julialang.org/t/we-should-offer-repl-in-the-repl/3116/1 "2017-04-08T10:58:03Z")

</div>

There is much helpful with the REPL. “?REPL” would serve many well.

---

<div class="post-metadata">

**Author:** ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Post date:** [April 8, 2017, 1:14pm UTC](https://discourse.julialang.org/t/we-should-offer-repl-in-the-repl/3116/2 "2017-04-08T13:14:56Z")

</div>

Or just ? (with nothing else)

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [April 8, 2017, 1:24pm UTC](https://discourse.julialang.org/t/we-should-offer-repl-in-the-repl/3116/3 "2017-04-08T13:24:45Z")

</div>

You can already type `?` at the help prompt (type `??<enter>`) and it gives a couple of documentation links.

```julia
help?> ?
search:

  Welcome to Julia 0.5.0. The full manual is available at

  http://docs.julialang.org/

  as well many great tutorials and learning resources:

  http://julialang.org/learning/

  For help on a specific function or macro, type ? followed by its name, e.g.
  ?fft, or ?@time, and press enter.

```

---

<div class="post-metadata">

**Author:** ![JeffreySarnoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeffreysarnoff/32/1980_2.png) [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Post date:** [April 8, 2017, 2:27pm UTC](https://discourse.julialang.org/t/we-should-offer-repl-in-the-repl/3116/4 "2017-04-08T14:27:04Z")

</div>

@stevengj got that … given that Julia’s REPL is broad common ground and it is the situated present from whence many of us find first stirrings of anticipatory excitement and comfort from the harsh otherness of most general purpose manners of programming … my thought is that we need:

@dpsanders  
`julia> ?` shows me a shallow-leveled outline of terms, commands, macros and keyboard shortcuts so I may know to do:

`julia> ?interactive` to see that I can type the first few letters of something and uparrow to its entirety that I had entered last week.  
And ishow me the term `keys` so I know to use `julia> ?keys` to re-familiarize myself with the latent power that is our REPL.

**An open hand extends one’s reach. Julia’s too.**

\_

---

<div class="post-metadata">

**Author:** ![drjrkuhn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drjrkuhn/32/920_2.png) [@drjrkuhn](https://discourse.julialang.org/u/drjrkuhn)\
**Post date:** [April 8, 2017, 9:33pm UTC](https://discourse.julialang.org/t/we-should-offer-repl-in-the-repl/3116/5 "2017-04-08T21:33:16Z")

</div>

While learning Julia, I have often found the REPL help system… wanting.

REPL help is great if you already know the name of a method, but rather less helpful if you do not know the exact method name or package it is located in. I find that `apropos("foo")` is not always the best way of getting around either.

Yes, a user can search the Julia docs, but that will not help him/her determine what is available right now in his/her particular Julia installation. And package listings are all on separate github pages with no common API documentation (like doxygen or javadoc). The REPL has access to package docs, but no simple and obvious way to peruse them per package.

In my opinion, the REPL help `??<enter>` should quickly show the user how to:

- list functions names exported by a given package along with their short description strings, defaulting to Base.
- list type names exported by a given package along with their short description strings, defaulting to Base
- list the method signatures defined for a particular function name [`methods(foo)`].
- list the package[s] exporting a given type or method
- how to use `which` to locate method definitions.

The REPL help listing could also use a slightly better buffer than a simple dump. The interface could be similar to the `less` or `man` command, pausing at each screen-full and allowing search terms with `'/'`.

---

<div class="post-metadata">

**Author:** ![Fab](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fab/32/907_2.png) [@Fab](https://discourse.julialang.org/u/Fab)\
**Post date:** [April 11, 2017, 6:29am UTC](https://discourse.julialang.org/t/we-should-offer-repl-in-the-repl/3116/6 "2017-04-11T06:29:59Z")

</div>

Possibly related observation:

At the help prompt, giving a base package name (Pkg, Dates, etc.) gives “README.md not found”

```julia
help?> Pkg
search: Pkg

  No documentation found.

  No README.md found for module Base.Pkg.

```

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [April 11, 2017, 12:46pm UTC](https://discourse.julialang.org/t/we-should-offer-repl-in-the-repl/3116/7 "2017-04-11T12:46:41Z")

</div>

PRs for better documentation are always welcome. This is an easy way to contribute that doesn’t require a lot of technical knowledge of Julia internals.

e.g. adding help for `Pkg` is just a matter of adding a docstring before `module Pkg` in the source code. `Pkg` is already well documented in the manual, so the docstring just needs to be an abbreviated summary.

(Docstrings were only added in Julia 0.4, and they still haven’t been written for a lot of pre-existing functionality.)

---

<div class="post-metadata">

**Author:** ![Fab](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fab/32/907_2.png) [@Fab](https://discourse.julialang.org/u/Fab)\
**Post date:** [April 14, 2017, 1:50pm UTC](https://discourse.julialang.org/t/we-should-offer-repl-in-the-repl/3116/8 "2017-04-14T13:50:14Z")

</div>

Thanks, @stevengj. It was not clear to me what needed to be done (I tried what was suggested by the message, adding a README.md to the /pkg directory, and re-maked the documentation, and that didn’t work), and I had asked what needed to be done [on Discourse here](https://discourse.julialang.org/t/no-documentation-for-base-packages-at-repl-help-prompt/3068), but did not get a reply there. I might have a shot at adding it, thanks for the explanation.
