Change iTerm2 tab title dynamically for Ruby/Rails

时间秒杀一切 提交于 2019-12-05 03:25:43

This command will set a tab's title to MY_NEW_TITLE

echo -e "\033];MY_NEW_TITLE\007"

Matt

The best way to do this depends on your shell.

I use zsh, which allows you to define hook functions which are run when command are run, before the prompt is printed, etc (actually, the code I'm using lives on github.

It looks as though bash has similar functionality.

I'd probably use the echo command in one of the other answers here, or zsh's title function to set the title from within your scripts, then ensure it's set back using a hook which runs before the next prompt is drawn.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!