Modify Title in REPL window

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 :slight_smile: or the terminal just that much faster. I suppose not instant, while I could never see it blink.

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:

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

1 Like