-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.zshrc
More file actions
139 lines (121 loc) · 4.38 KB
/
.zshrc
File metadata and controls
139 lines (121 loc) · 4.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
autoload -Uz compinit && compinit
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
[ ! -d $ZINIT_HOME ] && mkdir -p "$(dirname $ZINIT_HOME)"
[ ! -d $ZINIT_HOME/.git ] && git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
source "${ZINIT_HOME}/zinit.zsh"
export CLAUDE_CODE_ENABLE_TELEMETRY="0"
export BUN_INSTALL="$HOME/.bun"
export ANTHROPIC_LOG=error
export EDITOR=nvim
export PATH="$HOME/.cargo/bin:$PATH"
export PATH="$HOME/.local/bin:$PATH"
export PI_TELEMETRY=0
export CNB_NO_UPDATE_NOTICE="1"
# export CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL="1"
export GITLAB_URI=https://software.cottinghambutler.com
path=(
$HOME/.cargo/bin
$BUN_INSTALL/bin
$path
)
export PATH=$PATH:$path
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
# Defines the characters that zsh considers part of a word (^W)
WORDCHARS='*?[]~=&;!#$%^(){}<>,|`'
setopt appendhistory sharehistory hist_ignore_space hist_ignore_all_dups hist_save_no_dups hist_ignore_dups hist_reduce_blanks hist_find_no_dups
eval "$(fzf --zsh)"
eval "$(atuin init zsh)"
if command -v zoxide &>/dev/null && [[ "$CLAUDECODE" != "1" ]]; then
eval "$(zoxide init --cmd cd zsh)"
# Ensure __zoxide_z function exists
if ! type __zoxide_z &>/dev/null; then
function __zoxide_z() {
if [[ "$#" -eq 0 ]]; then
builtin cd ~
elif [[ "$#" -eq 1 ]] && { [[ -d "$1" ]] || [[ "$1" = '-' ]] || [[ "$1" =~ ^[-+][0-9]$ ]]; }; then
builtin cd "$1"
else
local result
result="$(command zoxide query --exclude "$(pwd)" -- "$@")" && builtin cd "${result}"
fi
}
fi
fi
eval "$(starship init zsh)"
eval "$(direnv hook zsh)"
source <(carapace chmod zsh)
autoload -Uz edit-command-line
zle -N edit-command-line
# cfi is find all ignoring .git
alias cfi='cd $(find . -type d -path "./.git" -prune -o -type d -not -path "*/\.*" -print | fzf --reverse --preview "ls --color {}")'
alias cldo="claude --dangerously-load-development-channels plugin:firepit@pantheon-skills --dangerously-skip-permissions --model='opus[1m]' $@"
alias clds="claude --dangerously-load-development-channels plugin:firepit@pantheon-skills --dangerously-skip-permissions --model=sonnet $@"
alias cldk="claude --dangerously-load-development-channels plugin:firepit@pantheon-skills --dangerously-skip-permissions --model=haiku $@"
alias nvimf='~/dotfiles/modules/programs/nvimf/nvimf'
alias nviml='~/dotfiles/modules/programs/nviml/'
alias v='nvim $@'
# cf is find all - shell function wrapper for cf program
cf() {
local dir
dir=$(command cf "$@")
if [ -n "$dir" ]; then
cd "$dir"
fi
}
alias g='git'
alias git-reset='git checkout main && git pull'
alias gr='git-reset'
alias gs='git status'
alias gd='git diff'
alias gsh='git stash'
alias gsp='git stash pop'
# nvimfi is find all files ignoring .git
alias nvimfi='nvim "$(find . -type f -path "./.git" -prune -o -type f -not -path "*/\.*" -print | fzf --preview "bat --color=always {}")"'
alias nxi='nix'
alias wtr='git worktree remove'
alias wtl='git worktree list'
alias wta='git worktree add'
alias wt='git worktree'
alias wtd='git worktree remove'
alias k='kubectl'
alias nix-env='echo "panic: nix-env is disabled (#61)" >&2 && false'
alias vim='nvim'
alias v='nvim'
alias vf='nvimf'
alias vfi='nvimfi'
if command -v cnb &>/dev/null; then
alias os='cnb rocks'
alias osv='cnb rocks validate --all --strict'
export DOCKER_HOST="unix://$HOME/.colima/default/docker.sock"
else
alias os='spectr'
alias osv='spectr validate --all --strict'
fi
alias kl='klaude'
# Load a few important annexes, without Turbo
zi light-mode for \
zdharma-continuum/zinit-annex-as-monitor \
zdharma-continuum/zinit-annex-bin-gem-node \
zdharma-continuum/zinit-annex-patch-dl \
zdharma-continuum/zinit-annex-rust
zi light zsh-users/zsh-autosuggestions
zi load zsh-users/zsh-completions
zi load zsh-users/zsh-syntax-highlighting
zi load nix-community/nix-zsh-completions
zi load Aloxaf/fzf-tab
zi load jeffreytse/zsh-vi-mode
zi load zpm-zsh/clipboard
function zvm_after_init() {
bindkey '^X^X' edit-command-line
bindkey '^p' history-search-backward
bindkey '^n' history-search-forward
bindkey '^[[1;5C' forward-word
bindkey '^[[1;5D' backward-word
}
# Noncase-sensitive completion
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
zstyle ':completion:*' list-colors "\$\{(s.:.)LS_COLORS\}"
zstyle ':completion:*' menu no
source <(kubectl completion zsh)