-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbashrc
61 lines (51 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
# hdevieux
# .bashrc
# This file is managed by dotfiles repository
# Last updated: 3/22/2017
# Source external functions
test -f "${HOME}"/.bash_functions && source "${HOME}"/.bash_functions
test -f "${HOME}"/.bash_aliases && source "${HOME}"/.bash_aliases
# Color definitions
GREEN="\[\033[1;32m\]"
RED="\[\033[1;31m\]"
YELLOW="\[\033[1;33m\]"
RESET="\[\033[0m\]"
# This may be changed in local machine configuration
PROMPT_COLOR=${GREEN}
export PS1="[${PROMPT_COLOR}\h${RESET}]:\u:\w${YELLOW}\$(git_branch_info)${RESET} \n$ "
# Terminal colors
export CLICOLOR=1
if [ "$(uname)" == 'Darwin' ]; then
export LSCOLORS=GxFxCxDxBxegedabagaced
elif [ "$(uname)" == 'Linux' ]; then
export LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33'
alias ls='ls --color=always'
fi
# Switch EDITOR depending on whether we're running in emacs or not
if [ -z "$INSIDE_EMACS" ]; then
export EDITOR=/usr/bin/vim
else
export ALTERNATE_EDITOR=""
export EDITOR="/usr/local/bin/emacsclient"
export VISUAL="/usr/local/bin/emacsclient"
fi
# Tmux inherits PATH, so avoid repeated entries
if [ -z "$TMUX" ]; then
# Local binaries
export PATH="$PATH:$HOME/bin"
# GO Paths
export GOPATH="$HOME/gocode"
export PATH="$PATH:$GOPATH/bin"
export PATH="$PATH:/usr/local/go/bin"
# Rust Path
if [ -d "$HOME/.cargo/bin" ]; then
export PATH="$PATH:$HOME/.cargo/bin"
fi
fi
# Append to history
shopt -s histappend
shopt -s cmdhist
# Format timestamp for history
export HISTTIMEFORMAT="%m/%d/%y %T "
# Machine-local configurations. These override previous settings
test -f "${HOME}"/.bash_local && source "${HOME}"/.bash_local