forked from justone/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc.load
60 lines (49 loc) · 1.74 KB
/
.bashrc.load
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
source ~/.bashrc.d/.git-completion.sh
source ~/.bashrc.d/.git-alias-completion.sh
source ~/.bashrc.d/.git-prompt.sh
source ~/.bashrc.d/.mark-jump
source ~/.bashrc.d/.functions
export PATH=$PATH:$HOME/bin
export CLICOLOR=1
export LSCOLORS="ExGxBxDxCxEgEdxbxgxcxd"
export TERM=xterm-color
# Display
export DISPLAY=:0.0
# Aliases
alias ls="ls -G"
export EDITOR='nvim'
function color_my_prompt {
# Define some colors for use to use
local __gold='\033[1;38;5;136m'
local __none='\033[0m'
if [ -n "$PRODUCTION_PS1" ]; then
local __machine_color='\033[48;5;52m'
else
local __machine_color='\033[48;5;17m'
fi
# Some exports that modify what __git_ps1 does
export GIT_PS1_SHOWDIRTYSTATE="1"
export GIT_PS1_SHOWUNTRACKEDFILES="1"
export GIT_PS1_SHOWUPSTREAM="auto"
export GIT_PS1_STATESEPARATOR=""
# Show user@host only when we're remote, coloring it differently on mission-critical machines
if [ -n "$SSH_CLIENT" ]; then
# I want some machines flagged as red, namely production machines
local __machine="\[$__machine_color\][\u@\h]\[$__none\]"
fi
# Finally put it all together
local __base_prompt="$__machine\[$__gold\]\W\[$__none\]"
local __git_prompt_fmt='\[\033[2m\](%s)\[\033[0m\]'
# Using PROMPT_COMMAND keeps BASH informed of exactly how long our prompt string is, avoiding issues with CTRL-A, etc.
export PROMPT_COMMAND="__git_ps1 \"$__base_prompt\" \"\\\$ \" \"$__git_prompt_fmt\""
}
color_my_prompt
#Go
export GOPATH=$HOME/projects/go # don't forget to change your path correctly!
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
#Pyenv
eval "$(fasd --init auto)"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"