-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.zshrc
86 lines (73 loc) · 1.73 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
79
80
81
82
83
84
85
86
#
# Ensure we find ~/bin and the homebrew utilities
#
export PATH=/opt/homebrew/bin:$PATH
export PATH=$HOME/Repos/github.com/skx/dotfiles/bin:$PATH
export PATH=$HOME/go/bin:$PATH
export PATH=$HOME/bin:$PATH
#
# Avoid homebrew cleanup, so we keep old things around.
#
export HOMEBREW_NO_INSTALL_CLEANUP=1
#
# If homebrew is installed ensure that it is used.
#
if type brew &>/dev/null
then
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
fi
#
# Load the completion for ZSH, along with the bash compatibility
#
autoload -U +X compinit && compinit
autoload -U +X bashcompinit && bashcompinit
#
# I use atuin for shell-history
#
if type atuin &>/dev/null
then
eval "$(atuin init zsh --disable-up-arrow)"
fi
#
# We need to configure the use of plugins for the pass password-manager.
#
# specifically I use the OTP plugin for two factor authentication for various services.
#
export PASSWORD_STORE_ENABLE_EXTENSIONS=true
export PASSWORD_STORE_EXTENSIONS_DIR=/usr/local/lib/password-store/extensions
#
# History control
#
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_FIND_NO_DUPS
setopt HIST_SAVE_NO_DUPS
setopt SHARE_HISTORY
setopt appendhistory
#
# Alias to pipe stuff to less
#
# ls LL
#
# And I'm spoiled by the use of 'rgrep' on Debian systems.
#
alias -g LL=' |& less'
alias -g rgrep='grep -R '
#
# If we have a local configuration-file, then load it.
#
if [ -e ~/.zshrc.local ] ; then
source ~/.zshrc.local
fi
#
# Avoid Escape-backspace from deleting the previous token, instead
# delete components as with bash.
#
autoload -U select-word-style
select-word-style bash
#
# Ensure the comment-character works in interactive sessions.
#
setopt interactivecomments