# Is there an easy way to get at the history of REPL input?

**URL:** <https://discourse.julialang.org/t/is-there-an-easy-way-to-get-at-the-history-of-repl-input/18025>\
**Category:** General Usage\
**Tags:** repl\
**Created:** [November 26, 2018, 6:28pm UTC](https://discourse.julialang.org/t/is-there-an-easy-way-to-get-at-the-history-of-repl-input/18025 "2018-11-26T18:28:48Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![airpmb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/airpmb/32/7826_2.png) [@airpmb](https://discourse.julialang.org/u/airpmb)\
**Post date:** [February 7, 2021, 1:26am UTC](https://discourse.julialang.org/t/is-there-an-easy-way-to-get-at-the-history-of-repl-input/18025/21 "2021-02-07T01:26:09Z")

</div>

Man I love the Julia community. I feel like I have a magic lamp. And also the Genie has a time machine because what I wish for usually already has been made and is even in the registry!

I wonder though, might this belong in InteractiveUtils.jl? I can also think of a lot of enhancements that could really help with REPL productivity. Mostly some of the creature comforts I recall from [IPython](https://ipython.readthedocs.io/en/stable/interactive/reference.html#input-caching-system).

---

<div class="post-metadata">

**Author:** ![airpmb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/airpmb/32/7826_2.png) [@airpmb](https://discourse.julialang.org/u/airpmb)\
**Post date:** [February 12, 2021, 6:02pm UTC](https://discourse.julialang.org/t/is-there-an-easy-way-to-get-at-the-history-of-repl-input/18025/22 "2021-02-12T18:02:13Z")

</div>

Somewhat related: I just realized that OhMyREPL has enhanced history search which is pretty sweet, though it doesn’t AFAICT have a way to narrow to just the current session. I opened a feature request issue for that: [https://github.com/KristofferC/OhMyREPL.jl/issues/238](https://github.com/KristofferC/OhMyREPL.jl/issues/238)

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [August 17, 2021, 7:59am UTC](https://discourse.julialang.org/t/is-there-an-easy-way-to-get-at-the-history-of-repl-input/18025/23 "2021-08-17T07:59:22Z")

</div>

Not sure if this has been mentioned:

- In Windows with the \*.jl file extension registered for opening with VS Code, adding the following to `startup.jl` will open the REPL history in a VS Code tab, that updates automatically as more commands are typed:

```julia
path = raw"C:\Users\jrafa\.julia\logs\repl_history.jl"
run(`cmd /c code "" $path`)

```

or one may define a ` history()` function instead:

```julia
history() = run(`cmd /c code "" "C:\Users\jrafa\.julia\logs\repl_history.jl"`)

```

_ **NB:** inspired by this @greg_plowman’s [post](https://discourse.julialang.org/t/edit-on-windows/1695/7)_

---

<div class="post-metadata">

**Author:** ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Post date:** [October 26, 2021, 1:44pm UTC](https://discourse.julialang.org/t/is-there-an-easy-way-to-get-at-the-history-of-repl-input/18025/24 "2021-10-26T13:44:20Z")

</div>

but does it work on mac?

[Previous page](https://discourse.julialang.org/t/is-there-an-easy-way-to-get-at-the-history-of-repl-input/18025.md?page=1)
