今天升級2.10
結果gnome-terminal的提示符號變成 bash-2.05b$
但是console底下還是跟以前一樣
[solved]gnome-terminal的提示符號怎麼改?
Moderator: Forums Team
[solved]gnome-terminal的提示符號怎麼改?
Last edited by kyozi on Mon Apr 25, 2005 2:05 am, edited 1 time in total.
把 PS1 放到 ~/.bashrc ?
GOT 討論區管理規則及使用指南
http://forums.gentoo.tw/viewtopic.php?t=43260
實行中!
加入 GOT 的郵件討論!
http://lists.linux.org.tw/cgi-bin/mailm ... nfo/gentoo
http://forums.gentoo.tw/viewtopic.php?t=43260
實行中!
加入 GOT 的郵件討論!
http://lists.linux.org.tw/cgi-bin/mailm ... nfo/gentoo
Re: gnome-terminal的提示符號怎麼改?
你的PS1裡面的string被改了kyozi wrote:今天升級2.10
結果gnome-terminal的提示符號變成 bash-2.05b$
但是console底下還是跟以前一樣
如果你有之前的.bashrc備份
就把它複製到home directory
然後source ~/.bashrc就好了 @__@
沒有的話可以去看我之前有分享我自己的.bashrc
你可以參考看看
bashrc沒有被改掉....
跟更新2.10前的備份一樣...
bash是2.05b-r9[/code]
跟更新2.10前的備份一樣...
Code: Select all
# Change the window title of X terminals
case $TERM in
xterm*|rxvt|Eterm|eterm)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
;;
screen)
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"'
;;
esac
你是用bash???kyozi wrote:bashrc沒有被改掉....
跟更新2.10前的備份一樣...
bash是2.05b-r9[/code]Code: Select all
# Change the window title of X terminals case $TERM in xterm*|rxvt|Eterm|eterm) PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"' ;; screen) PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\"' ;; esac
那可以用更簡單的方式表示你想要的提示符號
try this @__@
你的語法好像是FreeBSD的方式
如果我沒記錯的話(好像是csh...)
Code: Select all
#BG color is blue if you are common user, red color if you are root
if [ ${UID} -eq 0 ]; then
PS1="\[\033[1;41;37m\][\u@\h \w ]\[\033[0;37m\]\$ "
else
PS1="\[\033[1;44;37m\][\u@\h \w ]\[\033[0;37m\]\$ "
fi
export PS1