]> ruderich.org/simon Gitweb - config/dotfiles.git/blob - shell/bash/rc
Move to shell/ in preparation for merge into new dotfiles repository
[config/dotfiles.git] / shell / bash / rc
1 # Main bash configuration file.
2 #
3 # Is sourced by all interactive bash shells and other shells like scp or rcp.
4
5 # Copyright (C) 2011-2013  Simon Ruderich
6 #
7 # This file is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
11 #
12 # This file is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this file.  If not, see <http://www.gnu.org/licenses/>.
19
20
21 . ~/.shell/functions
22
23 source_config ~/.shell/env
24
25
26 # Check if this is an interactive shell. Abort if not to prevent problems with
27 # scp and rcp. Taken from default Debian bashrc. Thanks.
28 if [[ $- != *i* ]]; then
29     return
30 fi
31
32
33 # Set the prompt; hostname and current working directory are displayed.
34 # Hostname is displayed in bold green, current directory in yellow.
35 PS1='\[\033[01;32m\]\h\[\033[00m\]:\[\033[33m\]\w\[\033[00m\] \$ '
36
37 # Use Vi(m) style readline mappings in bash.
38 set -o vi
39
40
41 source_config ~/.shell/aliases
42 source_config ~/.shell/rc
43
44 source_config ~/.bash/rc.local
45
46 # vim: ft=sh