Linux中国 Linux中国门户站!
设为主页 设为主页
收藏本站 收藏本站
 
当前位置 :首页 ->Linux技术 ->系统管理 ->正文

CSH Multiline prompt

来源:Linux-cn.com 作者:Webmaster 时间:2007-05-05 点击: [收藏] [投稿]
Copy the following into ~/.cshrc

set NONE="33[0m"
set BLACK="33[0;30m"
set DK_GRAY="33[1;30m"
set BLUE="33[0;34m"
set LT_BLUE="33[1;34m"
set GREEN="33[0;32m"
set LT_GREEN="33[1;32m"
set CYAN="33[0;36m"
set LT_CYAN="33[1;36m"
set RED="33[0;31m"
set LT_RED="33[1;31m"
set PURPLE="33[0;35m"
set LT_PURPLE="33[1;35m"
set BROWN="33[0;33m"
set YELLOW="33[1;33m"
set LT_GRAY="33[0;37m"
set WHITE="33[1;37m"

# %B  begin bold
# %b  end bold
# %{  begin control escape
# %}  end control escape, cannot be the last in prompt
# %m  hostname, without domain
# %/  current directory
# %D  day in dd format
# %W  month in mm format
# %Y  year in yyyy format
# %l  tty
# %P  time in 24 hour format
# %h  history number

#set mhost=`/bin/uname -n | /bin/sed -e '/^ *$/d' -e 's/..*//'`
set mhost=`/bin/uname -n`
set mtty=`/usr/bin/tty | cut -d/ -f 3-4`
alias precmd '/usr/bin/tput bold; set mclock=`date +%X`; echo "
${LT_RED}${mhos
t}${NONE} : ${LT_CYAN}${mtty}${NONE} : ${LT_GREEN}${mclock}${NONE} : ${YELLOW}${
cwd}${NONE}"; /usr/bin/tput sgr0'

if ( -o /bin/su ) then
        set prompt="%B%{${LT_PURPLE}%}%h %{${NONE}%}# %b"
else
        set prompt="%B%{${LT_PURPLE}%}%h %{${NONE}%}% %b"
endif



 如果您对本文有任何疑问或者建议,请到讨论区发表您的意见: >> 论坛入口 <<



上一篇:RedHat 8.0/9.0 LVS安裝手冊   下一篇:设置 MySql 数据同步

文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论
更多相关文章
Power by linux-cn.com 粤ICP备05006655号