Change Linux Terminal Title

Change Linux Terminal Title,第1张

Change Linux Terminal Title

Add following code to .bashrc

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

And source ~/.bashrc

Then open a terminal and run command title:

After execute this command:

 

欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/zaji/5720284.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-12-18
下一篇2022-12-18

发表评论

登录后才能评论

评论列表(0条)

    保存