# What should I do to display all contents in Julia?

**URL:** <https://discourse.julialang.org/t/what-should-i-do-to-display-all-contents-in-julia/12042>\
**Category:** General Usage\
**Created:** [June 28, 2018, 5:21pm UTC](https://discourse.julialang.org/t/what-should-i-do-to-display-all-contents-in-julia/12042 "2018-06-28T17:21:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dai](https://avatars.discourse-cdn.com/v4/letter/d/a3d4f5/32.png) [@dai](https://discourse.julialang.org/u/dai)\
**Post date:** [June 28, 2018, 5:21pm UTC](https://discourse.julialang.org/t/what-should-i-do-to-display-all-contents-in-julia/12042/1 "2018-06-28T17:21:21Z")

</div>

Hello Everyone,

Is there a command like “More on/off” in MATLAB.

I use REPL console under Julia-cliant0.6.13 in Atom.

When we refer contents of long variable, for simple example, x = rand(30,1) makes 30 x 1 array.

In the console(REPL), then return “x”, it is omitted in contents of “x” in the middle as a default.

What should I do to display all contents in REPL of Julia like a “More off” Matlab command ?

---

<div class="post-metadata">

**Author:** ![jbrea](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jbrea/32/3879_2.png) [@jbrea](https://discourse.julialang.org/u/jbrea)\
**Post date:** [June 28, 2018, 6:57pm UTC](https://discourse.julialang.org/t/what-should-i-do-to-display-all-contents-in-julia/12042/2 "2018-06-28T18:57:14Z")

</div>

`showall(x)`

---

<div class="post-metadata">

**Author:** ![dai](https://avatars.discourse-cdn.com/v4/letter/d/a3d4f5/32.png) [@dai](https://discourse.julialang.org/u/dai)\
**Post date:** [June 28, 2018, 8:54pm UTC](https://discourse.julialang.org/t/what-should-i-do-to-display-all-contents-in-julia/12042/3 "2018-06-28T20:54:44Z")

</div>

thank you brea,

Using “showall” and “show” is not display row style.  
I want to let it display it in variable same form if it all possible.

---

<div class="post-metadata">

**Author:** ![jbrea](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jbrea/32/3879_2.png) [@jbrea](https://discourse.julialang.org/u/jbrea)\
**Post date:** [June 29, 2018, 8:39am UTC](https://discourse.julialang.org/t/what-should-i-do-to-display-all-contents-in-julia/12042/4 "2018-06-29T08:39:43Z")

</div>

`show(STDOUT, "text/plain", x)`

The function that is called, when just typing `x` in the REPL is [here](https://github.com/JuliaLang/julia/blob/d55cadc350d426a95fd967121ba77494d08364c8/base/REPL.jl#L119). One could hack this to optionally have `show(IOContext(io, :limit => false), mime, x)`.

---

<div class="post-metadata">

**Author:** ![dai](https://avatars.discourse-cdn.com/v4/letter/d/a3d4f5/32.png) [@dai](https://discourse.julialang.org/u/dai)\
**Post date:** [June 29, 2018, 12:29pm UTC](https://discourse.julialang.org/t/what-should-i-do-to-display-all-contents-in-julia/12042/5 "2018-06-29T12:29:20Z")

</div>

Oh, you are genius !

I understood it well very much.

Internal function of the REPL module change “true” into “false”.

This method was saved me very much because it did not appear in various manuals.

Thank you very much, jbrea !

( “moreon/off( )” in Julia, I think that it would be convenient if such a function 🙂 )

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [June 29, 2018, 12:39pm UTC](https://discourse.julialang.org/t/what-should-i-do-to-display-all-contents-in-julia/12042/6 "2018-06-29T12:39:21Z")

</div>

> [@dai](#):
>
> ( “moreon/off( )” in Julia, I think that it would be convenient if such a function 🙂 )

While this could be handy in interactive use, it would require a global state, which would complicate a lot of other things (eg reproducibility, testing, threads, …). Generally, global states are avoided if possible for these reasons.

Having this implemented with `IOContext` with an easily accessible API is probably a better solution.

---

<div class="post-metadata">

**Author:** ![dai](https://avatars.discourse-cdn.com/v4/letter/d/a3d4f5/32.png) [@dai](https://discourse.julialang.org/u/dai)\
**Post date:** [June 29, 2018, 12:49pm UTC](https://discourse.julialang.org/t/what-should-i-do-to-display-all-contents-in-julia/12042/7 "2018-06-29T12:49:47Z")

</div>

Thank you your advice !

I see that a design of global states have complicated issue.

I’ve been looking forward to your lesson.
