我的超强 bash 提示 ^^

桌面秀,不同桌面、不同风格。
回复
头像
xiooli
帖子: 6956
注册时间: 2007-11-19 21:51
来自: 成都
联系:

我的超强 bash 提示 ^^

#1

帖子 xiooli » 2008-10-10 20:39

:em09
附件
Screenshot- 终端 .png
头像
xiooli
帖子: 6956
注册时间: 2007-11-19 21:51
来自: 成都
联系:

Re: 我的超强 bash 提示 ^^

#2

帖子 xiooli » 2008-10-10 20:47

赫赫,这样两行就不会看走眼了 :em11
头像
yaoms
帖子: 4952
注册时间: 2007-10-19 14:51
来自: 深圳

Re: 我的超强 bash 提示 ^^

#3

帖子 yaoms » 2008-10-10 20:50

好XX的提示符
Nothing 有事请发邮件到 yms541 AT gmail.com
alias 爱慕颇雷尔='mplayer'
头像
bones7456
帖子: 8495
注册时间: 2006-04-12 20:05
来自: 杭州
联系:

Re: 我的超强 bash 提示 ^^

#4

帖子 bones7456 » 2008-10-10 20:50

晕,眼神不会这么差吧!!
关注我的blog: ε==3
头像
solcomo
帖子: 2838
注册时间: 2007-04-25 13:12

Re: 我的超强 bash 提示 ^^

#5

帖子 solcomo » 2008-10-10 20:54

看着头晕了..
♜♞♝♛♚♝♞♜
♟♟♟♟♟♟♟♟
♙♙♙♙♙♙♙♙
♖♘♗♕♔♗♘♖

☠☯⚔⚓☣☦☃☕
☹☻☪☭☬⚖⚛⚜
ℜℳℬ™ ℋℯℓ℘ ℳℭ
sƂɐʍ рǀɹoʍ əɥʇ oS
头像
adagio
论坛版主
帖子: 22110
注册时间: 2008-02-17 23:47
来自: 美丽富饶的那啥星球

Re: 我的超强 bash 提示 ^^

#6

帖子 adagio » 2008-10-10 21:03

底色怎么整出来?贴上来嘛
明天就换大三八!
——8核CPU、8G内存、8T硬盘……
8卡交火,80寸大屏放8个……
IPv8的光纤要8条……

---------------------------------------------------------------------------------
[图片版]新手当自强(续)FAQ
[新手进阶]挂载、fstab、调整linux分区
[图片版]E17桌面环境配置手把手
头像
xiooli
帖子: 6956
注册时间: 2007-11-19 21:51
来自: 成都
联系:

Re: 我的超强 bash 提示 ^^

#7

帖子 xiooli » 2008-10-10 21:14

adagio 写了:底色怎么整出来?贴上来嘛
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# don't put duplicate lines in the history. See bash(1) for more options
export HISTCONTROL=ignoredups
# ... and ignore same sucessive entries.
export HISTCONTROL=ignoreboth

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi

# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ] && [ -x /usr/bin/dircolors ]; then
eval "`dircolors -b`"
alias ls='ls --color=auto'
alias dir='ls --color=auto --format=vertical'
alias vdir='ls --color=auto --format=long'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi

# some more ls aliases
alias ll='ls -l'
alias la='ls -A'
alias l='ls -CF'

# user-defined aliases
#alias rm='rm -vi'
#alias cp='cp -vi'
#alias mv='mv -vi'
alias clean='rm -f "#"* "."*~ *~ *.dvi *.aux *.log'
alias clr='clear'
alias agi='sudo apt-get install'
alias acs='sudo apt-cache search'

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi

#颜色代码

export back_green="\[\033[01;42m\]"
export back_blue="\[\033[01;44m\]"

export black="\[\033[0;38;5;0m\]"
export red="\[\033[0;38;5;1m\]"
export green="\[\033[0;38;5;2m\]"
export yellow="\[\033[0;38;5;3m\]"
export blue="\[\033[0;38;5;4m\]"
export magenta="\[\033[0;38;5;55m\]"
export cyan="\[\033[0;38;5;6m\]"
export white="\[\033[00m\]"
export coldblue="\[\033[0;38;5;33m\]"
export smoothblue="\[\033[0;38;5;111m\]"
export iceblue="\[\033[0;38;5;45m\]"
export turqoise="\[\033[0;38;5;50m\]"
export smoothgreen="\[\033[0;38;5;42m\]"

#自定义函数

x () { #解压

if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) rar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
"") 没有输入文件名! ;;
*) echo "'$1' 不能通过 x 解压" ;;
esac
else
echo "'$1' 不是有效文件!"
fi

}

pre_prompt () {

if [ ${changed:-0} -eq 0 ];then
PS1="${back_green}\u${back_blue}(\w)${back_green}╠♦ ${white}"
changed=1
else
PS1="${back_blue}\u${back_green}(\w)${back_blue}╠♦ ${white}"
changed=0
fi
}

unset PROMPT_COMMAND
PROMPT_COMMAND=pre_prompt



#彩色man page

export BROWSER=export PAGER="/usr/bin/less -s"
export BROWSER="$PAGER"
export LESS_TERMCAP_mb=$'\033[01;31m'
export LESS_TERMCAP_md=$'\033[01;31m'
export LESS_TERMCAP_me=$'\033[0m'
export LESS_TERMCAP_se=$'\033[0m'
export LESS_TERMCAP_so=$'\033[01;44m'
export LESS_TERMCAP_ue=$'\033[0m'
export LESS_TERMCAP_us=$'\033[01;32m'
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: 我的超强 bash 提示 ^^

#8

帖子 eexpress » 2008-10-10 21:18

想死哦。
● 鸣学
头像
xiooli
帖子: 6956
注册时间: 2007-11-19 21:51
来自: 成都
联系:

Re: 我的超强 bash 提示 ^^

#9

帖子 xiooli » 2008-10-10 21:59

eexpress 写了:想死哦。
:em23 :em24
aBiNg
帖子: 1331
注册时间: 2006-07-09 12:22
来自: 南京

Re: 我的超强 bash 提示 ^^

#10

帖子 aBiNg » 2008-10-10 22:02

那叫 PS1,搞什么 bash 提示,要的就是专业,装也要装出来啊。:D
头像
xiooli
帖子: 6956
注册时间: 2007-11-19 21:51
来自: 成都
联系:

Re: 我的超强 bash 提示 ^^

#11

帖子 xiooli » 2008-10-10 22:28

aBiNg 写了:那叫 PS1,搞什么 bash 提示,要的就是专业,装也要装出来啊。:D
俺知道是PS1(primary prompt string?),不过难道不也是bash的提示么?
头像
HuntXu
帖子: 5776
注册时间: 2007-09-29 3:09

Re: 我的超强 bash 提示 ^^

#12

帖子 HuntXu » 2008-10-10 22:52

看着头晕...还不如写个脚本每行递增一个数显示... :em04

P.S.:又见贝壳大牛bs提示符...上次我才被骂过... :em21 :em19
HUNT Unfortunately No Talent...
头像
eagle5678
帖子: 1865
注册时间: 2006-07-08 14:07

Re: 我的超强 bash 提示 ^^

#13

帖子 eagle5678 » 2008-10-19 22:26

个人觉得终端下的中文字之间间隔太宽了,不知怎改 :em02
回复