# /etc/bashrc # System wide functions and aliases # Environment stuff goes in /etc/profile # By default, we want this to get set. # Even for non-interactive, non-login shells. umask 022 # are we an interactive shell? if [ "$PS1" ]; then case $TERM in xterm*) if [ -e /etc/sysconfig/bash-prompt-xterm ]; then PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm else PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}"; echo -ne "\007"' fi ;; screen) if [ -e /etc/sysconfig/bash-prompt-screen ]; then PROMPT_COMMAND=/etc/sysconfig/bash-prompt-screen else PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}"; echo -ne "\033\\"' fi ;; *) [ -e /etc/sysconfig/bash-prompt-default ] && PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default ;; esac # Turn on checkwinsize shopt -s checkwinsize #[ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ " [ "$PS1" = "\\s-\\v\\\$ " ] && [ "`id -u`" -eq 0 ] && PS1=$'\[\E[01;31m\]\u\[\E[0m\]@\[\E[01;36m\]\h\[\E[0m\]:\w\[\E[01;31m\]\$\[\E[0m\] ' [ "$PS1" = "\\s-\\v\\\$ " ] && PS1=$'\[\E[01;32m\]\u\[\E[0m\]@\[\E[01;36m\]\h\[\E[0m\]:\w\[\E[01;32m\]\$\[\E[0m\] ' fi if ! shopt -q login_shell ; then # We're not a login shell # Need to redefine pathmunge, it get's undefined at the end of /etc/profile pathmunge () { if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then if [ "$2" = "after" ] ; then PATH=$PATH:$1 else PATH=$1:$PATH fi fi } for i in /etc/profile.d/*.sh; do if [ -r "$i" ]; then . $i fi done unset i unset pathmunge fi # vim:ts=4:sw=4 # custom aliases : alias c='clear' alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' alias ls='ls -hlF' alias ll='ls -hlF' alias l='ls' alias vi='vim' alias updatedb='/usr/libexec/locate.updatedb' # packages for PKG_ADD : #PKG_PATH=ftp://ftp.netbsd.org/pub/NetBSD/packages/4.0/i386/All PKG_PATH=http://ftp.fr.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/5.0/All/ export PKG_PATH #export CVSROOT="anoncvs@anoncvs.fr.netbsd.org:/cvsroot" #export CVSROOT="anoncvs@anoncvs.netbsd.org:/cvsroot" #export CVS_RSH="ssh" export PAGER=`which most` export EDITOR=$(which vim)