# Pre-filled input for readline()

**URL:** <https://discourse.julialang.org/t/pre-filled-input-for-readline/78969>\
**Category:** General Usage\
**Tags:** question, repl, io\
**Created:** [April 4, 2022, 12:35am UTC](https://discourse.julialang.org/t/pre-filled-input-for-readline/78969 "2022-04-04T00:35:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jarbus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jarbus/32/29516_2.png) [@jarbus](https://discourse.julialang.org/u/jarbus)\
**Post date:** [April 4, 2022, 12:35am UTC](https://discourse.julialang.org/t/pre-filled-input-for-readline/78969/1 "2022-04-04T00:35:30Z")

</div>

Is there a way to pre-fill the buffer for readline()? Say for instance I want to have the following

```nohighlight
Enter a name for this run:
20XX-MM-DD |

```

where the date is already filled in and a user’s cursor is at the |, that way they don’t have to enter the date for each run, and can delete it if they want to. Is this possible? I couldn’t find anything about it.

---

<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:** [April 4, 2022, 12:59pm UTC](https://discourse.julialang.org/t/pre-filled-input-for-readline/78969/2 "2022-04-04T12:59:31Z")

</div>

I have no idea how to do this, but the request seems very useful.

As a workaround, maybe there is a way to push the desired string into an IOBuffer, as `readline()` seems to keep some kind of history when we use the up and down arrows?
