-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_zshrc
More file actions
60 lines (46 loc) · 1.69 KB
/
Copy pathdot_zshrc
File metadata and controls
60 lines (46 loc) · 1.69 KB
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
#!/usr/bin/env zsh
source "$HOME/.shellrc"
HISTSIZE=1000000000
SAVEHIST=$HISTSIZE
# https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/history.zsh
setopt append_history # keep history file growing instead of overwriting it
setopt hist_save_by_copy # avoid history loss when multiple shells exit together
setopt extended_history # record timestamp of command in HISTFILE
setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE
setopt hist_ignore_dups # ignore duplicated commands history list
setopt hist_ignore_space # ignore commands that start with space
setopt hist_verify # show command with history expansion to user before running it
setopt share_history # share command history data
if [ -d "$HOME/.zsh.d" ]; then
FPATH=$HOME/.zsh.d:$FPATH
fi
autoload -Uz compinit && compinit
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH
compdef _git gap='git-add'
compdef _git gb='git-branch'
compdef _git gca='git-commit'
compdef _git gco='git-checkout'
compdef _git gcp='git-checkout'
compdef _git gcv='git-commit'
compdef _git gd='git-diff'
compdef _git gfo='git-fetch'
compdef _git gpu='git-push'
compdef _git grc='git-rebase'
compdef _git gs='git-status'
fi
if command -v b4 > /dev/null 2>&1; then
eval "$(b4 --print-completion zsh)"
fi
bindkey -e
if command -v direnv >/dev/null 2>&1; then
eval "$(direnv hook zsh)"
fi
if command -v mise >/dev/null 2>&1; then
eval "$(mise activate zsh)"
fi
# OpenAI shrc (if customising, comment out to prevent it getting readded)
# for file in "/Users/tamird/.openai/shrc"/*; do
# source "$file"
# done
# eval "$(z profile)"