Bash PS1 window title?

后端 未结 1 1893
不思量自难忘°
不思量自难忘° 2021-01-14 11:57

Say I have this as my PS1

PS1=\'\\[\\e]0;TITLE\\a\\]\\n\\[\\e[32m\\]\\u@\\h \\[\\e[33m\\]\\w\\[\\e[0m\\]\\n\\$ \'

it will give me this prom

相关标签:
1条回答
  • 2021-01-14 12:31

    The terminal driver looks for output containing that specific code (\e]0;)and uses everything up to the \a as the terminal window title.

    0 讨论(0)
提交回复
热议问题