-
Notifications
You must be signed in to change notification settings - Fork 0
/
bashrc
67 lines (56 loc) · 1.87 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
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
alias ll='ls -lisahG'
alias ..='cd ..'
alias :q="exit"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
export PATH=/usr/local/bin:$PATH
export PATH=$HOME/.bash/bin:$PATH
export PATH=$PATH:$HOME/.composer/vendor/bin
export PATH=/usr/local/sbin:$PATH
export PATH=$PATH:/Library/TeX/texbin
export OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include
export OPENSSL_ROOT_DIR=/usr/local/opt/openssl
export DEP_OPENSSL_INCLUDE=/usr/local/opt/openssl/include
export EDITOR=vim
export VISUAL=vim
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export IGNOREEOF=2
export export GOPATH=$HOME/code/go
export PATH=$PATH:$GOPATH/bin
export CDPATH=$GOPATH/src
# Base16 Shell
#BASE16_SHELL="$HOME/.bash/colors/base16-shell/base16-solarized.light.sh"
#[[ -s $BASE16_SHELL ]] && source $BASE16_SHELL
export TERM="xterm-256color"
export NVIM_TUI_ENABLE_TRUE_COLOR=1
alias tmux="tmux -2"
# gnu utils from homebrew
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
export MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH"
fortune | cowsay
#### PROMPT
# Get the Git branch
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
last_two_directories() {
echo -n "${PWD/#$HOME/~}" | awk -F "/" '{
if (length($0) > 14) { if (NF>4) print $1 "/" $2 "/.../" $(NF-1) "/" $NF;
else if (NF>3) print $1 "/" $2 "/.../" $NF;
else print $1 "/.../" $NF; }
else print $0;}'
}
# Custom bash prompt
#
# Includes custom character for the prompt, path, and Git branch name.
#
# Source: kirsle.net/wizards/ps1.html
PS1="\n\u@\h \[$(tput bold)\]\[$(tput setaf 5)\]➜ \[$(tput setaf 6)\] \$(last_two_directories)\[$(tput setaf 3)\]\$(parse_git_branch) \[$(tput sgr0)\]"
if [ -z "$SSH_AUTH_SOCK" ] ; then
eval `ssh-agent -s`
ssh-add
fi