]> git.decadent.org.uk Git - dak.git/blob - config/homedir/.bashrc
security-master.d.o is moving to seger.d.o
[dak.git] / config / homedir / .bashrc
1 # bashrc for dak user
2
3 # If not running interactively, don't do anything
4 [ -z "$PS1" ] && return
5
6
7 # append to the history file, don't overwrite it
8 shopt -s histappend
9 export HISTCONTROL=ignoreboth
10
11 # check the window size after each command and, if necessary,
12 # update the values of LINES and COLUMNS.
13 shopt -s checkwinsize
14
15 # make less more friendly for non-text input files, see lesspipe(1)
16 [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
17
18 ## A little nice prompt.
19 PS1='`_ret=$?; if test $_ret -ne 0; then echo "\[\033[01;31m\]$_ret "; set ?=$_ret; unset _ret; fi`\[\033[01;33m\][`git branch 2>/dev/null|cut -f2 -d\* -s` ] \[\033[01;32m\]\u@\[\033[00;36m\]\h\[\033[01m\]:\[\033[00;37m\]\w\[\033[00m\]\$ '
20
21 # If this is an xterm set the title to user@host:dir
22 case "$TERM" in
23 xterm*|rxvt*)
24     PS1="\[\e]0;\u@\h: \w\a\]$PS1"
25     ;;
26 *)
27     ;;
28 esac
29
30 case "$HOSTNAME" in
31     franck|coccia)
32         export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
33         ;;
34     seger)
35         export SCRIPTVARS=/srv/security-master.debian.org/dak/config/debian-security/vars
36         ;;
37     *)
38         echo "Unconfigured dak host, not importing the usual vars"
39         ;;
40 esac
41
42 if [[ -n ${SCRIPTVARS} ]]; then
43     . $SCRIPTVARS
44 fi
45
46 function em() {
47     export EDITOR=$(which emacs)
48 }
49
50 export PAGER=less
51 export LESS="-X"
52 export EDITOR=$(which vim)
53 export HISTFILESIZE=6000
54 export GREP_OPTIONS="--color=auto"
55 export CDPATH=".:~:${base}:${public}:${queuedir}"
56 export PATH="~/bin/:${PATH}"
57
58 alias base='cd ${base}'
59 alias config='cd ${configdir}'
60 alias ls='ls --color=auto'