-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.zshrc
More file actions
92 lines (74 loc) · 3.38 KB
/
Copy path.zshrc
File metadata and controls
92 lines (74 loc) · 3.38 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
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
87
88
89
90
91
92
#!/usr/bin/env zsh
PATH="${HOME}/bin:${HOME}/.local/bin:${PATH}"
if [[ $(uname -m) == 'arm64' ]]
then
PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH"
else
PATH="/usr/local/sbin:$PATH"
fi
PATH="/opt/homebrew/opt/node@24/bin:$PATH"
export PATH
# https://consoledonottrack.com/
export DO_NOT_TRACK=1
# case insensitive path-completion
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*'
# partial completion suggestions
zstyle ':completion:*' list-suffixes zstyle ':completion:*' expand prefix suffix
# re-enable completion for cd ..
zstyle -e ':completion:*' special-dirs '[[ $PREFIX = (../)#(|.|..) ]] && reply=(..)'
if type brew &>/dev/null
then
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
autoload -Uz compinit
compinit
fi
## History file configuration
[ -z "$HISTFILE" ] && HISTFILE="$HOME/.zsh_history"
[ "$HISTSIZE" -lt 50000 ] && HISTSIZE=50000
[ "$SAVEHIST" -lt 10000 ] && SAVEHIST=10000
## History command configuration
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 INC_APPEND_HISTORY # append into history file
# setopt HIST_IGNORE_ALL_DUPS # remove the older command even if it is not the previous event
setopt HIST_REDUCE_BLANKS ## Delete empty lines from history file
setopt HIST_NO_STORE ## Do not add history and fc commands to the history
setopt HIST_IGNORE_SPACE # Do not add commands prefixed with a space to history
export LANG=en_GB.UTF-8
export HOMEBREW_NO_ANALYTICS=1
export HOMEBREW_AUTO_UPDATE_SECS=86400
export HOMEBREW_NO_INSTALL_CLEANUP=0
export HOMEBREW_CASK_OPTS="--fontdir=\"/Library/Fonts\" --no-quarantine"
export HOMEBREW_REQUIRE_TAP_TRUST=1
if `/usr/libexec/java_home 2> /dev/null`
then
export JAVA_HOME=$(/usr/libexec/java_home)
fi
alias g="git"
alias k="kubectl"
source $HOME/.zkbd/$TERM
[[ -n ${key[Home]} ]] && bindkey "${key[Home]}" beginning-of-line
[[ -n ${key[End]} ]] && bindkey "${key[End]}" end-of-line
[[ -n ${key[OptionLeft]} ]] && bindkey "${key[OptionLeft]}" backward-word
[[ -n ${key[OptionRight]} ]] && bindkey "${key[OptionRight]}" forward-word
[[ -n ${key[Delete]} ]] && bindkey "${key[Delete]}" delete-char
# https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/gpg-agent/gpg-agent.plugin.zsh
export GPG_TTY=$TTY
gpg-connect-agent updatestartuptty /bye &>/dev/null
# If enable-ssh-support is set, fix ssh agent integration
if [[ $(gpgconf --list-options gpg-agent 2>/dev/null | awk -F: '$1=="enable-ssh-support" {print $10}') = 1 ]]; then
unset SSH_AGENT_PID
if [[ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]]; then
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi
fi
# add local zshrc configuration
[ -f ~/.zshrc_local ] && source ~/.zshrc_local
export STARSHIP_CONFIG=$HOME/.starship.toml
eval "$(starship init zsh)"
eval "$(direnv hook zsh)"
# Replace zsh's default completion selection menu with fzf
source "/opt/homebrew/opt/fzf-tab/share/fzf-tab/fzf-tab.zsh"