# Prevent the REPL from changing the terminal title

**URL:** <https://discourse.julialang.org/t/prevent-the-repl-from-changing-the-terminal-title/113729>\
**Category:** General Usage\
**Created:** [May 2, 2024, 10:57am UTC](https://discourse.julialang.org/t/prevent-the-repl-from-changing-the-terminal-title/113729 "2024-05-02T10:57:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cbrnr](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@cbrnr](https://discourse.julialang.org/u/cbrnr)\
**Post date:** [May 2, 2024, 10:57am UTC](https://discourse.julialang.org/t/prevent-the-repl-from-changing-the-terminal-title/113729/1 "2024-05-02T10:57:09Z")

</div>

I just noticed that the Julia REPL is changing the terminal title to “Julia”. Is there any way to prevent it from doing that? I’d rather keep my custom terminal window titles…

---

<div class="post-metadata">

**Author:** ![HanD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hand/32/213908_2.png) [@HanD](https://discourse.julialang.org/u/HanD)\
**Post date:** [May 2, 2024, 2:46pm UTC](https://discourse.julialang.org/t/prevent-the-repl-from-changing-the-terminal-title/113729/2 "2024-05-02T14:46:13Z")

</div>

Are you sure it’s the REPL which does that? What shell are you using? I’m using zsh, and it changes the terminal title to whatever program I’m running.

To err on the safe side, I started a bash shell within my zsh shell. As expected, the terminal title changed to `bash`. Then, I started julia inside that shell, but the title remained `bash`.

---

<div class="post-metadata">

**Author:** ![cbrnr](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@cbrnr](https://discourse.julialang.org/u/cbrnr)\
**Post date:** [May 2, 2024, 2:59pm UTC](https://discourse.julialang.org/t/prevent-the-repl-from-changing-the-terminal-title/113729/3 "2024-05-02T14:59:49Z")

</div>

Yes, I’m pretty sure it’s the REPL. I’m using Terminal.app on macOS, and I’ve set the title to be “Terminal” in the settings (all dynamic things like working directory, process name, etc. are unchecked).

My shell is also zsh, and only Julia changes the title. If I start `bash`, my title does not change. If I start Julia from within `bash`, the title changes to Julia.

The only other program that changed the title for me was IPython, but it has a config option to disable it ([Stop IPython from changing terminal title - Stack Overflow](https://stackoverflow.com/a/40046958/1112283)).

I guess this is not about the shell, but more about the terminal app. I haven’t tried any alternatives, and I really don’t want to switch. I’ve looked at the REPL source code, but couldn’t find anything related to changing the title though.

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [May 2, 2024, 4:05pm UTC](https://discourse.julialang.org/t/prevent-the-repl-from-changing-the-terminal-title/113729/4 "2024-05-02T16:05:52Z")

</div>

> [@cbrnr](#):
>
> Yes, I’m pretty sure it’s the REPL. I’m using Terminal.app on macOS, and I’ve set the title to be “Terminal” in the settings (all dynamic things like working directory, process name, etc. are unchecked).

It’s not just the REPL – if I run `julia -e "1"` in a terminal on my Mac, which doesn’t load the REPL (I think?), then it changes the window title permanently to `Julia` even after the `julia` process exits.

 ![image](https://global.discourse-cdn.com/julialang/original/3X/3/0/30776319035f5f41efc652b384605eed316e0432.jpeg)

 ![image](https://global.discourse-cdn.com/julialang/original/3X/c/7/c7a899dd0087afd04239cbc8635cbfcc2f717ed7.jpeg)

but I can’t figure out where in the Julia code this is done.

PS. See also this thread on how to manually change the window title: [Modify Title in REPL window - #11 by Palli](https://discourse.julialang.org/t/modify-title-in-repl-window/87803/11)

---

<div class="post-metadata">

**Author:** ![cbrnr](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@cbrnr](https://discourse.julialang.org/u/cbrnr)\
**Post date:** [May 2, 2024, 5:19pm UTC](https://discourse.julialang.org/t/prevent-the-repl-from-changing-the-terminal-title/113729/5 "2024-05-02T17:19:08Z")

</div>

@stevengj exactly, the title remains after exiting, which is what is really bothering me, and I want to avoid manual hacks using `echo -ne "\033]0;Terminal\007"`. It’s interesting that it doesn’t only happen in the REPL though.
