-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
58 lines (42 loc) · 1.59 KB
/
.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
################################################################################
# Bash configuation for non-login shells
################################################################################
#---------------------------------------
# Below settings for interractive mode only
#---------------------------------------
[[ $- == *i* ]] || return 0
# Colors
########################################
export CLICOLOR=1
# History
########################################
export HISTCONTROL=ignoredups
export HISTSIZE=10000
export HISTFILESIZE=$HISTSIZE
shopt -s histappend # Append to .bash_history
shopt -s cmdhist # Squash multiline commands into one line in history
shopt -s histverify # Paste command from history into shell instead of executing it
# Completion
########################################
if ! shopt -oq posix; then
if which brew > /dev/null && [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
elif [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
# Misc
########################################
# Enable "**" pattern
shopt -s globstar
# Support more file types in less
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# Aliases
########################################
[ -f ~/.bash/aliases ] && . ~/.bash/aliases
# Visual
########################################
shopt -s checkwinsize # Update $LINES and $COLUMNS after each command
[ -f ~/.bash/prompt ] && . ~/.bash/prompt