# Trigger redisplay of the REPL prompt

**URL:** <https://discourse.julialang.org/t/trigger-redisplay-of-the-repl-prompt/21926>\
**Category:** General Usage\
**Tags:** repl\
**Created:** [March 15, 2019, 7:38pm UTC](https://discourse.julialang.org/t/trigger-redisplay-of-the-repl-prompt/21926 "2019-03-15T19:38:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ffevotte](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ffevotte/32/6587_2.png) [@ffevotte](https://discourse.julialang.org/u/ffevotte)\
**Post date:** [March 15, 2019, 7:38pm UTC](https://discourse.julialang.org/t/trigger-redisplay-of-the-repl-prompt/21926/1 "2019-03-15T19:38:45Z")

</div>

I have an asynchronous event that triggers some output in the REPL, and I’d like to trigger a redisplay of the prompt afterwards, so that users know the REPL is still active. Is there something in the REPL std lib to do this?

  

M(NY)WE:

```julia
julia> Timer(_->println("OK"), 3);

julia> OK

```

To be clear: I’d like a new prompt to be redisplayed after “OK”

---

<div class="post-metadata">

**Author:** ![bennedich](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bennedich/32/4894_2.png) [@bennedich](https://discourse.julialang.org/u/bennedich)\
**Post date:** [March 15, 2019, 9:23pm UTC](https://discourse.julialang.org/t/trigger-redisplay-of-the-repl-prompt/21926/2 "2019-03-15T21:23:56Z")

</div>

Try this:

```julia
julia> using REPL

julia> Timer(_->(println("OK\n"); REPL.LineEdit.refresh_line(Base.active_repl.mistate)), 3);

julia> OK

julia>

```

Alternatively, you can always hack it…

```julia
julia> using REPL

julia> Timer(_->print("OK\n\n\e[1m", Base.active_repl.prompt_color, REPL.JULIA_PROMPT, "\e[m"), 3);

julia> OK

julia>

```

---

<div class="post-metadata">

**Author:** ![ffevotte](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ffevotte/32/6587_2.png) [@ffevotte](https://discourse.julialang.org/u/ffevotte)\
**Post date:** [March 15, 2019, 9:29pm UTC](https://discourse.julialang.org/t/trigger-redisplay-of-the-repl-prompt/21926/3 "2019-03-15T21:29:54Z")

</div>

> [@bennedich](#):
>
> Try this:

Thanks!

  

> [@bennedich](#):
>
> Alternatively, you can always hack it

Yes, that is the workaround I was using, but I was almost sure something better existed…
