# /etc/bash/bashrc # # This file is sourced by all *interactive* bash shells on startup, # including some apparently interactive shells such as scp and rcp # that can't tolerate any output. So make sure this doesn't display # anything or bad things will happen ! # Test for an interactive shell. There is no need to set anything # past this point for scp and rcp, and it's important to refrain from # outputting anything in those cases. if [[ $- != *i* ]] ; then # Shell is non-interactive. Be done now! return fi # Bash won't get SIGWINCH if another process is in the foreground. # Enable checkwinsize so that bash will check the terminal size when # it regains control. #65623 # http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11) shopt -s checkwinsize # Set colorful PS1 only on colorful terminals. # dircolors --print-database uses its own built-in database # instead of using /etc/DIR_COLORS. Try to use the external file # first to take advantage of user additions. use_color=false safe_term=${TERM//[^[:alnum:]]/.} # sanitize TERM if [[ -f /etc/DIR_COLORS ]] ; then grep -q "^TERM ${safe_term}" /etc/DIR_COLORS && use_color=true elif type -p dircolors >/dev/null ; then if dircolors --print-database | grep -q "^TERM ${safe_term}" ; then use_color=true fi fi if ${use_color} ; then if [[ ${EUID} == 0 ]] ; then PS1="\n\[\033[35m\]\$(tail -n 1 /var/log/messages)\n\[\033[32m\]\w\n\[\033[1;31m\]\u@\h: \[\033[1;34m\]\$(/usr/bin/tty | /bin/sed -e 's:/dev/::'): \[\033[1;36m\]\$(/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g') files \[\033[1;33m\]\$(/bin/ls -lah | /bin/grep -m 1 total | /bin/sed 's/total //')b\[\033[0m\] -> \[\033[0m\]" else PS1="\n\[\033[35m\]\$(tail -n 1 /var/log/messages)\n\[\033[32m\]\w\n\[\033[1;32m\]\u@\h: \[\033[1;34m\]\$(/usr/bin/tty | /bin/sed -e 's:/dev/::'): \[\033[1;36m\]\$(/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g') files \[\033[1;33m\]\$(/bin/ls -lah | /bin/grep -m 1 total | /bin/sed 's/total //')b\[\033[0m\] -> \[\033[0m\]" fi else if [[ ${EUID} == 0 ]] ; then # show root@ when we don't have colors PS1='\u@\h \W \$ ' else PS1='\u@\h \w \$ ' fi fi # Try to keep environment pollution down, EPA loves us. unset use_color safe_term #mes rajouts [[ -f /etc/profile.d/bash-completion ]] && source /etc/profile.d/bash-completion alias ls="ls --color" alias urvxt="urxvt -e /bin/bash" alias links2="links2 -g -driver fb http://www.google.fr" alias irssi="irssi -c irc.freenode.net" alias emerge="emerge -va" alias mkdir="mkdir -v" alias cp="cp -v" alias mv="mv -v" alias rm="rm -v" alias modprobe="modprobe -v" alias mount="mount -v" alias chmod="chmod -v" alias chown="chown -v" alias ln="ln -v" alias df="df -h" alias du="du -h" alias import="import -quality 100 $web/screen.jpg" alias lsa="ls -A" alias lsl="ls -l" LFS=/mnt/lfs musique=/home/musique/musique web=/var/www/localhost/htdocs ruby=/home/kik/documents/programmes/ruby kik=/home/kik kernel=/usr/src/linux export LESSCHARSET=latin1 alias qemu="qemu -m 400 -soundhw all" PATH="$PATH"":/usr/kde/3.4/bin"