-
Notifications
You must be signed in to change notification settings - Fork 1
/
.bashrc
45 lines (35 loc) · 947 Bytes
/
.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
[[ `uname` == "Linux" ]] && alias ls="ls --color=auto"
[[ `uname` == "Darwin" ]] && alias ls="ls -FG"
alias grep="grep --color=auto"
alias ..="cd .."
export EDITOR=vim
export CLICOLOR=1
# export LSCOLORS=GxFxCxDxBxegedabagaced
HISTCONTROL=ignoreboth:erasedups
HISTFILESIZE=
shopt -s histappend
HISTSIZE=10000
[[ -d ~/bin ]] && export PATH=~/bin:$PATH
[[ -d ~/go/bin ]] && export PATH=~/go/bin:$PATH
[[ -a ~/.bashrc.local ]] && source ~/.bashrc.local
[[ -a ~/.git-prompt.sh ]] && source ~/.git-prompt.sh
[[ -a ~/.git-completion.bash ]] && source ~/.git-completion.bash
HOST_NAME=""
[[ $SSH_CLIENT != "" ]] && HOST_NAME="\u@\h "
function title {
printf "\033]0;%s\007" "$1"
}
__exit_status() {
if [ $? != 0 ]; then
printf -- "! "
fi
}
__hist_util() {
history -n
history -w
history -c
history -r
}
GIT_PS1_SHOWCOLORHINTS=1
PROMPT_COMMAND='__hist_util; __git_ps1 "\$(__exit_status)$HOST_NAME\W" " \\\$ "'
mkdir -p /tmp/vim