-
Notifications
You must be signed in to change notification settings - Fork 1
/
zshrc
78 lines (61 loc) · 2.21 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
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
export LANG=en_US.UTF-8
export EDITOR=vim
export ADOTDIR=~/.antigen/config
source ~/.antigen/antigen.zsh
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:${HOME}/.local/bin"
# Case-sensitive completion.
CASE_SENSITIVE="true"
# Display red dots whilst waiting for completion.
COMPLETION_WAITING_DOTS="true"
# Disable marking untracked files under VCS as dirty. This makes repository
# status check for large repositories much, much faster.
DISABLE_UNTRACKED_FILES_DIRTY="true"
# Don't start tmux in the IntelliJ terminal.
if ! ps -p $PPID | grep -q java; then
ZSH_TMUX_AUTOSTART=true;
fi
ZSH_TMUX_AUTOCONNECT=false
ANTIGEN_LOG=/tmp/antigen.log
antigen use oh-my-zsh
antigen bundle git
antigen bundle tmux
antigen bundle docker
antigen bundle mafredri/zsh-async@main
antigen bundle sindresorhus/pure@main
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-autosuggestions
antigen apply
# Don't retype commands on !!, just execute them.
unsetopt histverify
# Don't share history between terminals.
unsetopt share_history
setopt HIST_SAVE_NO_DUPS
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_IGNORE_ALL_DUPS
# Bash like autocompletion where tab completes the common prefix and then waits.
setopt autolist
unsetopt menucomplete
# https://github.com/zsh-users/zsh-autosuggestions/issues/158#issuecomment-276430989
autosuggest-accept-redraw() {
zle autosuggest-accept
zle redisplay
zle redisplay
}
zle -N autosuggest-accept-redraw
ZSH_AUTOSUGGEST_IGNORE_WIDGETS+=autosuggest-accept-redraw
bindkey '^ ' autosuggest-accept-redraw
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
which ag > /dev/null 2>&1 && export FZF_DEFAULT_COMMAND='ag --hidden --ignore .git -g ""'
export FZF_DEFAULT_OPTS='--height 40% --reverse --border'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export N_PREFIX="$HOME/n"; [[ :$PATH: == *":$N_PREFIX/bin:"* ]] || PATH+=":$N_PREFIX/bin"
# Aliases.
[ $(uname) = 'Linux' ] && alias open='xdg-open'
alias cb='git branch --merged | grep -v "\*\|master" | xargs -n 1 git branch -d'
alias cp='rsync -rvPai'
if [ $(uname) = 'Linux' ]; then
alias cat='~/.bin/bat/linux/bat'
else
alias cat='~/.bin/bat/osx/bat'
fi
alias ping='~/.bin/prettyping --nolegend'