-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdot_zshrc.tmpl
84 lines (62 loc) · 2.2 KB
/
dot_zshrc.tmpl
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
#
# This file is managed by chezmoi. Always edit it with the command
# chezmoi edit ~/.zshrc
# chezmoi diff
# chezmoi -v apply
#
#
# Executes commands at the start of an interactive session.
#
# Authors:
# Steve Francia <[email protected]>
## PATHS
path+=($HOME/go/bin)
path+=($HOME/bin)
## CONFIGURATIONS
# Uncomment the following line to use hyphen-insensitive completion. Case
# sensitive completion must be off. _ and - will be interchangeable.
HYPHEN_INSENSITIVE="true"
# Uncomment the following line to enable command auto-correction.
ENABLE_CORRECTION="true"
HISTFILE=${ZDOTDIR:-$HOME}/.zsh_history
SAVEHIST=5000
HISTSIZE=2000
## OPTIONS
setopt NO_CASE_GLOB # Globbing and tab-completion to be case-insensitive.
setopt GLOB_COMPLETE
setopt AUTO_CD # Enable changing to directories without typing cd first.
setopt CORRECT # enable command auto-correction
setopt CORRECT_ALL
# HISTORY
setopt EXTENDED_HISTORY # enable more detailed history (time, command, etc.)
setopt SHARE_HISTORY # share history across multiple zsh sessions
setopt APPEND_HISTORY # append to history
setopt INC_APPEND_HISTORY # adds commands as they are typed, not at shell exit
setopt HIST_VERIFY # let you edit !$, !! and !* before executing the command
setopt HIST_IGNORE_DUPS # do not store duplications
setopt HIST_REDUCE_BLANKS # removes blank lines from history
eval "$(starship init zsh)"
if [ -f ${HOME}/.aliases ]; then
. ${HOME}/.aliases
fi
zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
# pasting with tabs doesn't perform completion
zstyle ':completion:*' insert-tab pending
# default to file completion
zstyle ':completion:*' completer _expand _complete _files _correct _approximate
source ~/.antigen.zsh
antigen init ~/.antigenrc
{{ if eq .chezmoi.os "darwin" -}}
# macOS .zshrc contents
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh-completions:$FPATH
autoload -Uz compinit
compinit
fi
eval "$(zoxide init zsh)"
{{ else if eq .chezmoi.os "linux" -}}
# Linux .zshrc contents
{{ else if eq .chezmoi.os "windows" -}}
# Windows .zshrc contents
eval "$(zoxide init zsh | dos2unix)"
{{ end -}}