-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbashrc
85 lines (70 loc) · 2 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
#!/bin/bash
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
## terminal environment
unset COLORS
unset LS_COLORS
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
# Set autocompletion and PS1 integration
if [ `uname` = 'Darwin' ]; then
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
else
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
fi
## function to get the current branch if we are in a git repo
#__git_ps1 () {
# local b="$(git symbolic-ref HEAD 2>/dev/null)";
# if [ -n "$b" ]; then
# printf " (%s)" "${b##refs/heads/}";
# fi
#}
## The prompt
#export PS1='\u@\h:\w \[\033[31m\]$(__git_ps1 "(%s)") \[\033[01;34m\]$\[\033[00m\] '
## terminal
export TERM=xterm-256color
#powerline
#. ~/.vim/bundle/powerline/powerline/bindings/bash/powerline.sh
## default tweaks for mac os x
if [ `uname` == 'Darwin' ]; then
alias ls="ls -G"
alias ll="ls -laG"
export PATH=$PATH:~/Library/Python/2.7/bin
fi
## default path and library path
export PATH=$HOME/usr/bin:$PATH
export LD_LIBRARY_PATH=$HOME/usr/lib:$LD_LIBRARY_PATH
## configure editor
export ALTERNATE_EDITOR=vim
export EDITOR='vim'
export VISUAL=$EDITOR
export GIT_EDITOR=$EDITOR
alias emacs='emacsclient -t'
## language
export LC_CTYPE="en_US.UTF-8"
export LANG="en_US.UTF-8"
# load colors
BASE16_SCHEME="chalk"
BASE16_SHELL="$HOME/.config/base16-shell/base16-$BASE16_SCHEME.dark.sh"
[[ -s $BASE16_SHELL ]] && . $BASE16_SHELL
## load customizations
if [ -d "$HOME/.bashrc.d" ]; then
for file in $HOME/.bashrc.d/*; do
. $file
done
fi
[ -f ~/.fzf.bash ] && source ~/.fzf.bash