-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc
47 lines (39 loc) · 1022 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
46
47
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
alias ll='ls -l'
alias vi='vim'
alias rm='rm -i'
alias mv='mv -i'
alias cp='cp -i'
alias grep='grep --color=auto'
alias cat='bat'
alias ..='cd ..'
alias ...='cd ../..'
alias setproxy='export ALL_PROXY=socks5://127.0.0.1:1080'
alias unsetproxy='unset ALL_PROXY'
alias gg='go version'
export HISTSIZE=50000
export HISTFILESIZE=100000
export HISTCONTROL=ignoreboth:erasedups
export HISTIGNORE='ls:ll:pwd:history'
export HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S "
# config go proxy
GOPROXY=https://goproxy.cn,direct
# config go path
export GOPATH=$HOME/.go
export PATH=$PATH:$GOPATH/bin
# parse git branch
parse_branch()
{
git branch 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/「\1」/'
}
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
red="\[\e[1;38;5;124m\]"
cyan="\[\e[1;38;5;49m\]"
yellow="\[\e[1;38;5;227m\]"
color_end="\[\e[m\]"
PS1="${cyan}\W${color_end} ${yellow}\$(parse_branch)\\$ ${color_end}"