-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
31 lines (27 loc) · 887 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
######################## centos 7 自带 ########################
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
######################## 终端 256 色 ##########################
if [ "$TERM" == "xterm" ]; then
export TERM=xterm-256color
fi
######################## 别名 #################################
alias cp='cp -rv '
alias rm='rm -v'
alias rmdir='rmdir -v'
alias vi='vim'
alias ls='ls --color=auto'
alias ll='ls -l'
alias la='ls -a'
alias ping='ping -c 4'
alias grep='grep --color=auto'
alias sudo='sudo -E'
######################## PS1 主题 #############################
GREEN=$(tput setaf 2; tput bold)
BLUE=$(tput setaf 4; tput bold)
RESET=$(tput sgr0)
PS1='\[$GREEN\]\u@\h\[$BLUE\] \W \[$GREEN\]\$\[$RESET\] '
######################## 根据已有信息补历史命令 ###############
bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'