# Problems with prompt variable

**URL:** <https://discourse.julialang.org/t/problems-with-prompt-variable/53757>\
**Category:** General Usage\
**Tags:** repl\
**Created:** [January 22, 2021, 3:49am UTC](https://discourse.julialang.org/t/problems-with-prompt-variable/53757 "2021-01-22T03:49:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![emmanuelncb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/emmanuelncb/32/21246_2.png) [@emmanuelncb](https://discourse.julialang.org/u/emmanuelncb)\
**Post date:** [January 22, 2021, 3:49am UTC](https://discourse.julialang.org/t/problems-with-prompt-variable/53757/1 "2021-01-22T03:49:35Z")

</div>

Hi, i am studing julia lang and i want customize my prompt, but, the code stay some spaces after mark instead one space only and all times that i press one key the first line of prompt be duplicate. How can i fix this?

```julia
ver="v$(VERSION.major).$(VERSION.minor)" # version
yellow="\e[1;33m"; cyan="\e[36m"; code="\e[0m" # colors

print("$(yellow)Julia $(ver) \n$(cyan)>>$(code)") # PRINT TEST
Base.active_repl.interface.modes[1].prompt="$(yellow)Julia $(ver) \n$(cyan)>>$(code)" # SET PROMPT

```

With print test i don’t have problems, but, this is the result when i set the prompt variable… 😧  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/3/a/3a93d7cdb5ba9eb2ef7d7411307131ce3af47abb.png)

---

<div class="post-metadata">

**Author:** ![stillyslalom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stillyslalom/32/45687_2.png) [@stillyslalom](https://discourse.julialang.org/u/stillyslalom)\
**Post date:** [January 22, 2021, 4:45am UTC](https://discourse.julialang.org/t/problems-with-prompt-variable/53757/2 "2021-01-22T04:45:38Z")

</div>

Have you looked at [OhMyRepl.jl](https://kristofferc.github.io/OhMyREPL.jl/latest/features/prompt/)? It’s the standard package for REPL customization, and includes functions to change the prompt’s appearance.

---

<div class="post-metadata">

**Author:** ![emmanuelncb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/emmanuelncb/32/21246_2.png) [@emmanuelncb](https://discourse.julialang.org/u/emmanuelncb)\
**Post date:** [January 22, 2021, 4:51am UTC](https://discourse.julialang.org/t/problems-with-prompt-variable/53757/3 "2021-01-22T04:51:09Z")

</div>

Yes, I tried read the code to understanding how make this.  
But, i don’t find a exemple with more than one color and with newline

**Edit:** I tried run this with OhMyREPL and i had the same problem

```julia
OhMyREPL.input_prompt!("$(yellow)Julia $(ver) \n$(cyan)>>$(code)")

```
