-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
44 lines (35 loc) · 1.27 KB
/
.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
32
33
34
35
36
37
38
39
40
41
42
43
44
# powerlevel10k 默认(需置顶)
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# 变量
export ZSH=~/.oh-my-zsh
# Golang 环境
export GOPATH=~/go
export GOROOT="/usr/local/opt/go/libexec"
export PATH="$PATH:$GOPATH/bin"
# 别名
alias note="code ~/Documents/Note.code-workspace"
alias coda="code ~/Documents/Coda.code-workspace"
# brew install trash
alias rm="trash -vF" # 删除文件(Finder)
# 配置
ZSH_THEME="powerlevel10k/powerlevel10k" # 主题
DEFAULT_USER=$USER # 隐藏主机名
DISABLE_AUTO_UPDATE="true" # 禁用更新检查
ENABLE_CORRECTION="true" # 命令自动更正
HIST_STAMPS="yyyy-mm-dd" # 在 history 显示命令执行时间
# 插件
plugins=(
git
sudo # 命令前加 sudo
z # 目录跳转
vi-mode # 命令行 vi 模式
zsh-autosuggestions # 命令补全
zsh-syntax-highlighting # 语法高亮
zsh-poetry
)
source $ZSH/oh-my-zsh.sh
source ~/Dropbox/dotfiles/scripts.sh
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh