-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
35 lines (23 loc) · 846 Bytes
/
.zshrc
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
source ~/.bash_profile
source ~/.bashrc
# autosuggestions (git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions)
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
# zsh-syntax-highlighting
# source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# use powerlevel10k.zsh-theme if installed
#source /usr/local/share/powerlevel11k/powerlevel10k.zsh-theme
# Customizing the zsh Prompt
function git_branch {
branch="`git branch 2>/dev/null | grep "^\*" | sed -e "s/^\*\ //"`"
if [ "${branch}" != "" ];then
if [ "${branch}" = "(no branch)" ];then
branch="(`git rev-parse --short HEAD`...)"
fi
echo " ⇲ $branch"
fi
}
setopt prompt_subst
# left
PROMPT='white@%m %F{117}%2~ ‖%f%F{77}$(git_branch)%f ❯ '
# right
RPROMPT='⏱ %F{67}%T%f'