-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdot-bashrc
76 lines (62 loc) · 2.2 KB
/
dot-bashrc
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
75
76
#!/bin/bash
# shellcheck disable=SC1090
#
# Root bashrc, contains sym links to logically grouped settings
# Do nothing in non-interactive session as invoked by scp using sshd
case $- in
*i*) ;;
*) return ;;
esac
# Control bash history
HISTCONTROL=ignoreboth # ignore duplicatess and commands with lead space
HISTSIZE=1000 # no. of cmds stored in memory in present bash session
HISTFILESIZE=2000 # no. of cmds at startup + no. of cmds at session end
shopt -s histappend # append to previous history
# Check window size after each command, if necessary, updates LINES & COLUMNS
shopt -s checkwinsize
# Make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# Enable programmable completion features
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
source /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
source /etc/bash_completion
fi
fi
# source shell common settings
if [ -f ~/.config/shellcommon/common/common.sh ]; then
source ~/.config/shellcommon/common/common.sh
fi
# source bash options
if [ -f ~/.config/bashrcparts/options/options.bash ]; then
source ~/.config/bashrcparts/options/options.bash
fi
# source bash keymaps
if [ -f ~/.config/bashrcparts/keymaps/keymaps.bash ]; then
source ~/.config/bashrcparts/keymaps/keymaps.bash
fi
# source bash configurations
if [ -f ~/.config/bashrcparts/configs/configs.bash ]; then
source ~/.config/bashrcparts/configs/configs.bash
fi
# source bash completions
if [ -f ~/.config/bashrcparts/completions/completions.bash ]; then
source ~/.config/bashrcparts/completions/completions.bash
fi
# source bash local settings
if [ -f ~/.config/bashrcparts/local/local.bash ]; then
source ~/.config/bashrcparts/local/local.bash
fi
# source bash aliases
if [ -f ~/.config/bashrcparts/aliases/aliases.bash ]; then
source ~/.config/bashrcparts/aliases/aliases.bash
fi
# source bash plugins
if [ -f ~/.config/bashrcparts/plugins/plugins.bash ]; then
source ~/.config/bashrcparts/plugins/plugins.bash
fi
# source bash prompt
if [ -f ~/.config/bashrcparts/prompt/prompt.bash ]; then
source ~/.config/bashrcparts/prompt/prompt.bash
fi