.config/rss2email.cfg: Add Peter Stuge's blog
[dotfiles-public.git] / src / .bashrc
1 # This file is sourced by all *interactive* bash shells on startup,
2 # including some apparently interactive shells such as scp and rcp
3 # that can't tolerate any output.  So make sure this doesn't display
4 # anything or bad things will happen!
5
6 # Test for an interactive shell.  There is no need to set anything
7 # past this point for scp and rcp, and it's important to refrain from
8 # outputting anything in those cases.
9 if [[ $- != *i* ]] ; then
10         # Shell is non-interactive.  Be done now!
11         return
12 fi
13
14 # If not running interactively, don't do anything else
15 [ -z "$PS1" ] && return
16
17 # don't put duplicate line in the history and ignore lines starting
18 # with a space.  See bash(1).
19 export HISTCONTROL=ignoreboth
20
21 # check the window size after each command and, if necessary,
22 # update the values of LINES and COLUMNS.  See bash(1).
23 shopt -s checkwinsize
24
25 for FILE in ~/.bashrc.d/*; do
26         if [ -f "${FILE}" ]; then
27                 source "${FILE}"
28         fi
29 done
30
31 # reduce environment pollution
32 unset FILE