# ANN: REPLHistory

**URL:** <https://discourse.julialang.org/t/ann-replhistory/45422>\
**Category:** Package Announcements\
**Created:** [August 23, 2020, 4:35pm UTC](https://discourse.julialang.org/t/ann-replhistory/45422 "2020-08-23T16:35:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [August 23, 2020, 4:35pm UTC](https://discourse.julialang.org/t/ann-replhistory/45422/1 "2020-08-23T16:35:38Z")

</div>

> <https://github.com/JuliaRegistries/General/pull/20012>
>
> \- Registering package: REPLHistory
> \- Repository: https://github.com/PetrKryslUCS…D/REPLHistory.jl
> \- Created by: @PetrKryslUCSD
> \- Version: v0.1.0
> \- Commit: c516e47d4a051ef924839304dbc5b02ba5f677ee
> \- Reviewed by: @PetrKryslUCSD
> \- Reference: https://github.com/PetrKryslUCSD/REPLHistory.jl/commit/c516e47d4a051ef924839304dbc5b02ba5f677ee#commitcomment-41762778

Gain access to the Julia REPL history.

---

<div class="post-metadata">

**Author:** ![rfourquet](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rfourquet/32/3610_2.png) [@rfourquet](https://discourse.julialang.org/u/rfourquet)\
**Post date:** [August 24, 2020, 7:43am UTC](https://discourse.julialang.org/t/ann-replhistory/45422/2 "2020-08-24T07:43:07Z")

</div>

Can you say a few words here about what this package does, or at least give a link to the README?

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [August 24, 2020, 7:53am UTC](https://discourse.julialang.org/t/ann-replhistory/45422/3 "2020-08-24T07:53:54Z")

</div>

Looking at the code it seems that it prints the `n` number of last entries from the Julia REPL.

It seems pretty strange for this to be a macro and have all the work be done as a side effect of macro expansion time though. For example

```julia
julia> using REPLHistory

julia> function f()
           @history 5
       end
1
using REPLHistory
function f()
f (generic function with 1 method)

julia> f()
# nothing here

```

Why isn’t it just `history(5)`? Also, maybe it should return the string, instead of just printing it as a side effect, so you can do something with it?

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [August 24, 2020, 8:45pm UTC](https://discourse.julialang.org/t/ann-replhistory/45422/4 "2020-08-24T20:45:33Z")

</div>

Good feedback, thanks!
