# Modify Title in REPL window

**URL:** <https://discourse.julialang.org/t/modify-title-in-repl-window/87803>\
**Category:** General Usage\
**Tags:** repl\
**Created:** [September 26, 2022, 8:28am UTC](https://discourse.julialang.org/t/modify-title-in-repl-window/87803 "2022-09-26T08:28:21Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [September 26, 2022, 12:31pm UTC](https://discourse.julialang.org/t/modify-title-in-repl-window/87803/11 "2022-09-26T12:31:53Z")

</div>

> [@oheil](#):
>
> Probably those didn’t work, because bash is overwriting it instantly again

Yes, worked for me! Wow, of course bsh needs to update the title somehow, since it included the path (in hindsight obvious) and either my eyesight wasn’t fast enough 🙂 or the terminal just that much faster. I suppose not instant, while I could never see it blink.

> [@oheil](#):
>
> `PS1='$ '`

It’s best to not mess with that one, since you wanted this in the REPL anyway, and then when you exit you get your old prompt. Also setting any ENV in the Julia REPL wouldn’t do anything (unless you then invoke e.g. bash, and when you exit those ENVs would be destroyed. Also you don’t want to rely on bas or other shell like PowerShell.

Feel free to make a package with this one line:

```julia-auto
change_title(title) = Sys.iswindows() ? run(`cmd /C 'title '"$str_shell_title"`) : print("\033]0;$title\007")

```

For me at least now this (and echo in shell) changes the window title (as documented), but also the tab title, but the echo for tab title (or documented for) changes neither, so I strike it out in my original answer).

---

_[View the full topic](https://discourse.julialang.org/t/modify-title-in-repl-window/87803)._
