Problems with prompt variable

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?

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… :anguished:
image

Have you looked at OhMyRepl.jl? It’s the standard package for REPL customization, and includes functions to change the prompt’s appearance.

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

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