summaryrefslogtreecommitdiff
path: root/autoinstall/bootstrap/bashrc.txt
blob: db4283e96f2846afcbabe8436a97928a098f84a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash

cat > /home/kolab/.bashrc << EOF
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
    . /etc/bashrc
fi

# Set PATH before searching for sudo_utils
export PATH=\$HOME/bin:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin

# User specific aliases and functions
export HISTSIZE=9999999
export SVN_EDITOR=vim
export EDITOR=vim
export DEBEMAIL=vanmeeuwen@kolabsys.com
export DEBFULLNAME="Jeroen van Meeuwen (Kolab Systems)"

export LS_OPTIONS='--color=auto'
eval "\$(dircolors)"
alias ls='ls \$LS_OPTIONS'
alias ll='ls \$LS_OPTIONS -l'
alias l='ls \$LS_OPTIONS -lA'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWUNTRACKEDFILES=1
export GIT_PS1_SHOWUPSTREAM="auto verbose"

if [ ! -f "/etc/bash_completion" ]; then
    if [ -f "/etc/bash_completion.d/git" ]; then
        cp /etc/bash_completion.d/git ~/.git-completion.sh
        . ~/.git-completion.sh
        PS1='[\u@\h \W\$(__git_ps1 " (%s)")]\\$ '
    fi
else
    PS1='[\u@\h \W\$(__git_ps1 " (%s)")]\\$ '
fi
EOF

ln -sf /home/kolab/.bashrc /root/.bashrc