Added logwatch
[puppet-dbp.git] / files / bash.bashrc
blob52991670d2380564d789e2af4a4beb5fb2bc7d8b
1 # System-wide .bashrc file for interactive bash(1) shells.
3 # To enable the settings / commands in this file for login shells as well,
4 # this file has to be sourced in /etc/profile.
6 # If not running interactively, don't do anything
7 [ -z "$PS1" ] && return
9 # check the window size after each command and, if necessary,
10 # update the values of LINES and COLUMNS.
11 shopt -s checkwinsize
13 # set variable identifying the chroot you work in (used in the prompt below)
14 if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
15     debian_chroot=$(cat /etc/debian_chroot)
18 # set a fancy prompt (non-color, overwrite the one in /etc/profile)
19 PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
21 # If this is an xterm set the title to user@host:dir
22 case "$TERM" in
23 xterm*|rxvt*)
24     PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
25     ;;
27     ;;
28 esac
30 # enable bash completion in interactive shells
31 if [ -f /etc/bash_completion ]; then
32     . /etc/bash_completion
35 # enable color support of ls and also add handy aliases
36 if [ "$TERM" != "dumb" ]; then
37     eval `dircolors -b`
38     alias ls='ls --color=auto'
41 # some more ls aliases
42 alias l='ls -l'
43 alias la='ls -la'
45 # admin aliases
46 alias tf='tail -f /var/log/allmessages'
47 alias v='chcontext --ctx 1'
49 HISTSIZE=999999
50 HISTFILESIZE=$HISTSIZE
51 HISTCONTROL=erasedups
52 CDPATH=.:/var/lib/vservers/
53 export MANWIDTH=80
55 # if the command-not-found package is installed, use it
56 if [ -x /usr/lib/command-not-found ]; then
57         function command_not_found_handle {
58                 # check because c-n-f could've been removed in the meantime
59                 if [ -x /usr/lib/command-not-found ]; then
60                         /usr/bin/python /usr/lib/command-not-found -- $1
61                         return $?
62                 else
63                         return 127
64                 fi
65         }
68 # allow local modifications
69 if [ -f /etc/bash.bashrc.local ]; then
70     . /etc/bash.bashrc.local