Home Ubuntu重命名标签页 Rename Terminal Title
Post
Cancel

Ubuntu重命名标签页 Rename Terminal Title

refer to: https://askubuntu.com/questions/636944/how-to-change-the-title-of-the-current-terminal-tab-using-only-the-command-line

工作开发多了,会发现tab的数量太多, 如果能设置各种标签的名字就好了

这方面 windows  terminal preview就很好, 不但能设置名称,还能设置颜色

1. 修改 ~/.bashrc

function renametab() { if [[ -z "$ORIG" ]]; then ORIG=$PS1 fi TITLE="\[\e]2;$*\a\]" PS1=${ORIG}${TITLE} }

2. renametab  lueluelue

就可以看到效果了

This post is licensed under CC BY 4.0 by the author.