ksh 环境下设置 window title 和 彩色prompt

ksh 环境下更改 window title 和 prompt,并且设置PS1为彩色:

PS1=$'`echo -e "\033]0;$(hostname)\007[\033[1;31m$(logname)@$(hostname -s):\033[0m\033[1;32m${PWD}\033[0m]\n$ "`'

export PS1

 其中\007前面是window title,后面是prompt.

Reference:

http://tech0x20.com/2011/05/10/using-escape-codes-and-setting-window-title-on-ps1-for-ksh-korn-shell/

http://www.faqs.org/docs/Linux-mini/Xterm-Title.html

猜你喜欢

转载自smartgeek.iteye.com/blog/1709617
ksh