Prevent the REPL from changing the terminal title

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…

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.

Yes, I’m pretty sure it’s the REPL. I’m using 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).

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.

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.

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

@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.