-
Notifications
You must be signed in to change notification settings - Fork 3
/
.bashrc
64 lines (53 loc) · 1.62 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
59
60
61
62
63
64
# bashrc reloading
alias reload!='source ~/.bashrc'
# Source the shell scripts and such that I share between bash and zsh.
sh_common_dir=$HOME/.sh-include
if [ -d $sh_common_dir ]; then
for include in $sh_common_dir/*; do
source "$include"
done
fi
# editor / readline setup
export EDITOR=vim
set -o vi
bind -m vi-insert '"\C-x\C-e": edit-and-execute-command'
[ -f ~/.bash_prompt ] && source ~/.bash_prompt
# fzf https://github.com/junegunn/fzf
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
# Set history length
HISTFILESIZE=1000000000
HISTSIZE=1000000
# Append to the history file, don't overwrite it
shopt -s histappend
# Check the window size after each command and, if necessary, update the values
# of LINES and COLUMNS
shopt -s checkwinsize
# Autocorrect typos in path names when using `cd`
shopt -s cdspell
# Save all lines of a multiple-line command in the same history entry (allows
# easy re-editing of multi-line commands)
shopt -s cmdhist
# Do not autocomplete when accidentally pressing Tab on an empty line. (It
# takes forever and yields "Display all 15 gazillion possibilites?")
shopt -s no_empty_cmd_completion
# Locale
export LC_ALL=en_US.UTF-8
export LANG="en_US"
# Colors
RED="$(tput setaf 1)"
GREEN="$(tput setaf 2)"
YELLOW="$(tput setaf 3)"
BLUE="$(tput setaf 4)"
MAGENTA="$(tput setaf 5)"
CYAN="$(tput setaf 6)"
WHITE="$(tput setaf 7)"
GRAY="$(tput setaf 8)"
BOLD="$(tput bold)"
UNDERLINE="$(tput sgr 0 1)"
INVERT="$(tput sgr 1 0)"
NOCOLOR="$(tput sgr0)"
# Tell ls to be colourful
export CLICOLOR=1
# Tell grep to highlight matches
alias grep='grep --color=auto'
[ -f ~/.bash-preexec.sh ] && source ~/.bash-preexec.sh