-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
147 lines (112 loc) · 3.84 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#### Bash It
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# Path to the bash it configuration
export BASH_IT="${HOME}/.bash_it"
# Lock and Load a custom theme file.
# Leave empty to disable theming.
# location /.bash_it/themes/
export BASH_IT_THEME='bobby'
# (Advanced): Change this to the name of your remote repo if you
# cloned bash-it with a remote other than origin such as `bash-it`.
# export BASH_IT_REMOTE='bash-it'
# Your place for hosting Git repos. I use this for private repos.
export GIT_HOSTING='git@git.domain.com'
# Don't check mail when opening terminal.
unset MAILCHECK
# Change this to your console based IRC client of choice.
export IRC_CLIENT='irssi'
# Set this to the command you use for todo.txt-cli
export TODO='t'
# Set this to false to turn off version control status checking within the prompt for all themes
export SCM_CHECK=true
# Set Xterm/screen/Tmux title with only a short hostname.
# Uncomment this (or set SHORT_HOSTNAME to something else),
# Will otherwise fall back on $HOSTNAME.
# export SHORT_HOSTNAME=$(hostname -s)
# Set Xterm/screen/Tmux title with only a short username.
# Uncomment this (or set SHORT_USER to something else),
# Will otherwise fall back on $USER.
# export SHORT_USER=${USER:0:8}
# Set Xterm/screen/Tmux title with shortened command and directory.
# Uncomment this to set.
# export SHORT_TERM_LINE=true
# Set vcprompt executable path for scm advance info in prompt (demula theme)
# https://github.com/djl/vcprompt
# export VCPROMPT_EXECUTABLE=~/.vcprompt/bin/vcprompt
# (Advanced): Uncomment this to make Bash-it reload itself automatically
# after enabling or disabling aliases, plugins, and completions.
# export BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE=1
# Uncomment this to make Bash-it create alias reload.
# export BASH_IT_RELOAD_LEGACY=1
# Load Bash It
source "$BASH_IT"/bash_it.sh
#### Aliases
# Custom
alias rmdots="find . -name \"*.swp\" -exec rm -rf {} \\;"
alias now='date +"%T"'
alias nowdate='date +"%Y-%m-%d"'
alias lolls='ls | lolcat'
alias pyserver='python -m http.server'
alias json2xml='yg -p json -o xml'
alias json2yml='yg -p json -o yaml'
alias xml2json='yg -p xml -o json'
alias xml2yml='yg -p xml -o yaml'
alias yml2json='yg -p yaml -o json'
alias yml2xml='yg -p yaml -o xml'
# Unix commands
alias cp='cp -iv'
alias ll='ls -al'
alias ln='ln -iv'
alias ls='ls -FGlAhp'
alias mkdir='mkdir -p'
alias mv='mv -iv'
# Ruby
alias be='bundle exec'
# IP addresses
alias localip="ipconfig getifaddr en0"
# Typos
alias c='clear'
alias claer='clear'
alias clera='clear'
alias im='vim'
alias rpsec='rspec'
#### Export
# Default editor Vim
export EDITOR=vim
# Tell grep to highlight matches
export GREP_OPTIONS='—color=auto'
# Terminal history
export HISTCONTROL=ignoredups:ignorespace
export HISTSIZE=5000
export HISTFILESIZE=5000
export HISTTIMEFORMAT="%d/%m/%y %T "
# Highlighting of `man` pages
export LESS_TERMCAP_mb=$'\E[01;31m' # Begin blinking
export LESS_TERMCAP_md=$'\E[01;38;5;74m' # Begin bold
export LESS_TERMCAP_me=$'\E[0m' # End mode
export LESS_TERMCAP_se=$'\E[0m' # End standout-mode
export LESS_TERMCAP_so=$'\E[38;5;246m' # Begin standout-mode - info box
export LESS_TERMCAP_ue=$'\E[0m' # End underline
export LESS_TERMCAP_us=$'\E[04;38;5;146m' # Begin underline
# Disable Homebrew analytics
export HOMEBREW_NO_ANALYTICS=1
#### shopt
# Case-insensitive globbing (used in pathname expansion)
shopt -s nocaseglob;
# Append to the Bash history file, rather than overwriting it
shopt -s histappend;
# Autocorrect typos in path names when using `cd`
shopt -s cdspell;
if command -v pipenv 1>/dev/null 2>&1; then
eval "$(_PIPENV_COMPLETE=bash_source pipenv)"
fi
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi
if command -v rbenv 1>/dev/null 2>&1; then
eval "$(~/.rbenv/bin/rbenv init - bash)"
fi