-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbashrc
More file actions
33 lines (25 loc) · 1.56 KB
/
bashrc
File metadata and controls
33 lines (25 loc) · 1.56 KB
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
# ============================================================================
# Bash 配置
# ============================================================================
# ============================================================================
# 提示符配置
# ============================================================================
if [ `id -u` == 0 ]; then
PS1="\[$(tput bold)\]\[$(tput setaf 1)\]\u\[$(tput sgr0)\]\[$(tput setaf 4)\]@\[$(tput sgr0)\]\[$(tput setaf 5)\]\h \[$(tput sgr0)\]\w\[$(tput bold)\]\[$(tput setaf 1)\] \\$ \[$(tput sgr0)\]"
else
PS1="\[$(tput bold)\]\[$(tput setaf 3)\]\u\[$(tput sgr0)\]\[$(tput setaf 4)\]@\[$(tput sgr0)\]\[$(tput setaf 5)\]\h \[$(tput sgr0)\]\w\[$(tput bold)\]\[$(tput setaf 4)\] \\$ \[$(tput sgr0)\]"
fi
# ============================================================================
# 历史记录配置
# ============================================================================
export HISTTIMEFORMAT="[%y-%m-%d_%T] "
# ============================================================================
# 加载自定义配置
# ============================================================================
[[ -f "$HOME/.rc.d/env.sh" ]] && source "$HOME/.rc.d/env.sh"
[[ -f "$HOME/.rc.d/aliases.sh" ]] && source "$HOME/.rc.d/aliases.sh"
[[ -f "$HOME/.rc.d/functions.sh" ]] && source "$HOME/.rc.d/functions.sh"
# ============================================================================
# fzf 集成
# ============================================================================
[[ -f ~/.fzf.bash ]] && source ~/.fzf.bash