-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathzshrc
More file actions
90 lines (76 loc) · 3.27 KB
/
Copy pathzshrc
File metadata and controls
90 lines (76 loc) · 3.27 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
# Customize to your needs...
export PATH="$HOME/.local/bin:/opt/homebrew/opt/ruby/bin:/usr/local/opt/ruby/bin:$PATH:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:$HOME/go/bin:/opt/homebrew/opt/dotnet@6/bin"
export EDITOR=nvim
export VISUAL=nvim
export RUBYOPT="--jit"
export LOLCOMMITS_FORK=true
export LOLCOMMITS_STEALH=true
autoload -U up-line-or-beginning-search
autoload -U down-line-or-beginning-search
autoload -U edit-command-line
bindkey "^[[A" history-beginning-search-backward
bindkey "^[[B" history-beginning-search-forward
bindkey '^[[1~' beginning-of-line
bindkey '^[[4~' end-of-line
bindkey '^[[3~' delete-char
eval "$(sheldon source)"
autoload -Uz compinstall colors
zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate
zstyle ':completion:*' expand prefix suffix
zstyle ':completion:*' list-suffixes true
zstyle ':completion:*' matcher-list '' 'm:{[:lower:]}={[:upper:]}' '' 'm:{[:lower:]}={[:upper:]}'
zstyle :compinstall filename '/Users/oleksandr.slynko/.zshrc'
autoload -Uz compinit
# Only do full compinit rebuild once per day; otherwise use cached dump
if [[ -n ${ZDOTDIR:-$HOME}/.zcompdump(#qN.mh+24) ]]; then
compinit
else
compinit -C
fi
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
bindkey -e
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 # add commands to HISTFILE in order of execution
setopt share_history # share command history data
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
export PURE_PROMPT_SYMBOL=€
#
# Enable Ctrl-x-e to edit command line
autoload -U edit-command-line
# Emacs style
zle -N edit-command-line
bindkey '^xe' edit-command-line
bindkey '^x^e' edit-command-line
# Cache completion scripts to files, regenerate daily
_cached_completion() {
local name=$1 cmd=$2
local cache_dir="${XDG_CACHE_HOME:-$HOME/.cache}/zsh-completions"
local cache_file="$cache_dir/$name"
if [[ ! -f "$cache_file" || -n "$cache_file"(#qN.mh+24) ]]; then
mkdir -p "$cache_dir"
eval "$cmd" > "$cache_file" 2>/dev/null
fi
source "$cache_file"
}
_cached_completion conftest 'conftest completion zsh'
_cached_completion kubectl 'kubectl completion zsh'
_cached_completion argocd 'argocd completion zsh'
_cached_completion gh 'gh completion -s zsh'
export PATH="$PATH:$HOME/.dotnet/tools"
autoload -U +X bashcompinit && bashcompinit
complete -o nospace -C /opt/homebrew/bin/terraform terraform
export DOCKER_DEFAULT_PLATFORM=linux/amd64
_cached_completion uv 'uv generate-shell-completion zsh'
alias pytest='uv run pytest'
alias ruff='uv run ruff'
export PATH="/opt/homebrew/opt/openjdk@21/bin:$PATH"
# Copilot CLI session state sync via OneDrive
ONEDRIVE="$HOME/Library/CloudStorage/OneDrive-Microsoft"
alias cpsync='rsync -az ~/.copilot/session-state/ "$ONEDRIVE/copilot-state/session-state/"'
alias cppull='rsync -az "$ONEDRIVE/copilot-state/session-state/" ~/.copilot/session-state/'