-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_zshrc
85 lines (66 loc) · 2.69 KB
/
dot_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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#! /bin/zsh
export PATH=$HOME/bin:$PATH
export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH
export PATH=$HOME/.cargo/bin:$PATH
export PATH=$HOME/go/bin:$PATH
if command -v code >/dev/null 2>&1; then
export EDITOR="code --wait"
else
export EDITOR="vim"
fi
export ZSH="$HOME/.oh-my-zsh"
plugins=(git)
source $ZSH/oh-my-zsh.sh
bindkey -v
export KEYTIMEOUT=1
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
if command -v pyenv >/dev/null 2>&1; then
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
fi
export BAT_THEME="Visual Studio Dark+"
if command -v bat >/dev/null 2>&1; then
alias cat='bat'
fi
if [[ "$OSTYPE" == "darwin"* ]]; then
export DOCKER_DEFAULT_PLATFORM=linux/amd64
PATH="/opt/homebrew/opt/make/libexec/gnubin:$PATH"
PATH="/Volumes/data/notes/scripts:$PATH"
fi
# HISTORY
export HISTFILE="$HOME/.zsh_history"
export HISTSIZE=10000000
export SAVEHIST=10000000
export HIST_STAMPS="yyyy-mm-dd"
export HISTORY_IGNORE="(ls|ll|pwd|exit)*"
export FZF_DEFAULT_COMMAND="rg --files --hidden -g '!*.git*'"
# https://zsh.sourceforge.io/Doc/Release/Options.html (16.2.4 History)
setopt EXTENDED_HISTORY # Write the history file in the ':start:elapsed;command' format.
setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
setopt SHARE_HISTORY # Share history between all sessions.
setopt HIST_IGNORE_DUPS # Do not record an event that was just recorded again.
setopt HIST_IGNORE_ALL_DUPS # Delete an old recorded event if a new event is a duplicate.
setopt HIST_IGNORE_SPACE # Do not record an event starting with a space.
setopt HIST_SAVE_NO_DUPS # Do not write a duplicate event to the history file.
setopt HIST_VERIFY # Do not execute immediately upon history expansion.
setopt APPEND_HISTORY # append to history file (Default)
setopt HIST_NO_STORE # Don't store history commands
setopt HIST_REDUCE_BLANKS # Remove superfluous blanks from each command line being added to the history.
# https://stackoverflow.com/questions/33760647/makefile-autocompletion-on-mac
zstyle ':completion:*:*:make:*' tag-order 'targets'
autoload -U compinit && compinit
# https://github.com/nvm-sh/nvm
# export NVM_DIR=~/.nvm
# [ -f "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh" --no-use
# alias node='unalias node ; unalias npm ; nvm use default ; node $@'
# alias npm='unalias node ; unalias npm ; nvm use default ; npm $@'
# https://github.com/sindresorhus/pure
fpath+=($HOME/.zsh/pure)
autoload -U promptinit
promptinit
zstyle :prompt:pure:git:stash show yes
zstyle :prompt:pure:path color cyan
zstyle :prompt:pure:prompt:error color 161
zstyle :prompt:pure:execution_time color 230
prompt pure