能修改終端機$前的東西嗎? - Linux

Table of Contents

※ 引述《deepking (wnuiayldh)》之銘言:
: 我的是像這樣
: deepking@deepking-deskktop:~$
: 有辦法把 : 前的字串改短嗎?
: 或者是隱藏也好


man bash

\w the current working directory, with $HOME abbreviated with a tilde
\W the basename of the current working directory, with $HOME abbreviated
with a tilde

給您參考一下我的 PS1


[\[\033[1;32m\]\u\[\033[0m\]][\[\033[1;35m\]\h\[\033[0m\]][\[\033[1;36m\]\w\[\033[0m\]]
#

export PS1=
[\[\033[1;32m\]\u\[\033[0m\]][\[\033[1;35m\]\h\[\033[0m\]][\[\033[1;36m\]\w\[\033[0m\]]
#


--
Appleboy Blog: http://blog.Wu-Boy.com
Appleboy Life: http://life.wu-boy.com

--

All Comments

Adele avatarAdele2009-01-07
thx^^ 改完好看多了~
Kyle avatarKyle2009-01-08
推薦這篇文章