aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc
blob: f9b0e38d70aedfed213c09d89818d718c6d20034 (plain) (blame)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Don't do anything if not running interactively
if [[ $- != *i* ]]; then
    return
fi

# Keep plenty of history
HISTFILESIZE=1000000
HISTSIZE=1000000

# Ignore duplicate commands and whitespace in history
HISTCONTROL=ignoreboth

# Keep the times of the commands in history
HISTTIMEFORMAT='%F %T  '

# Don't tell me about mail
unset MAILCHECK

# Never beep at me
setterm -bfreq 0 2>/dev/null

# Turn off flow control and control character echo
stty -ixon -ctlecho 2>/dev/null

# Autocorrect fudged paths in cd calls
shopt -s cdspell 2>/dev/null

# Update the hash table properly
shopt -s checkhash 2>/dev/null

# Warn me about stopped jobs when exiting
shopt -s checkjobs 2>/dev/null

# Update columns and rows if window size changes
shopt -s checkwinsize 2>/dev/null

# Put multi-line commands onto one line of history
shopt -s cmdhist 2>/dev/null

# Expand globbing and variables for directory completion
shopt -s direxpand 2>/dev/null

# Autocorrect fudged paths during completion
shopt -s dirspell 2>/dev/null

# Include dotfiles in pattern matching
shopt -s dotglob 2>/dev/null

# Enable advanced pattern matching
shopt -s extglob 2>/dev/null

# Enable double-starring paths
shopt -s globstar 2>/dev/null

# Append rather than overwrite Bash history
shopt -s histappend 2>/dev/null

# Don't warn me about new mail all the time
shopt -u mailwarn 2>/dev/null

# Ignore me if I try to complete an empty line
shopt -s no_empty_cmd_completion 2>/dev/null

# Use programmable completion, if available
shopt -s progcomp 2>/dev/null

# Load any supplementary scripts
if [[ -d $HOME/.bashrc.d ]]; then
    for config in "$HOME"/.bashrc.d/*; do
        source "$config"
    done
fi
unset config