Skip to content
This repository was archived by the owner on Jun 4, 2026. It is now read-only.

Commit ce6c281

Browse files
committed
[automated commit or incremental update]
1 parent e01b1ef commit ce6c281

7 files changed

Lines changed: 101 additions & 72 deletions

File tree

1-zgen.rc

Lines changed: 41 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,37 +18,55 @@ export SHOW_AWS_PROMPT=false
1818
# compinit -u
1919

2020
if ! zgen saved; then
21-
# echo "Creating a zgen save"
21+
# Use mkdir as an atomic lock to prevent concurrent zgen save races
22+
_zgen_lockdir="${HOME}/.zgen/init.zsh.lock"
23+
if mkdir "$_zgen_lockdir" 2>/dev/null; then
24+
trap 'rmdir "$_zgen_lockdir" 2>/dev/null' EXIT INT TERM
2225

23-
## load omz plugins ##
24-
zgen oh-my-zsh plugins/fzf # https://github.com/ohmyzsh/ohmyzsh/issues/12412
25-
zgen oh-my-zsh plugins/command-not-found
26+
## load omz plugins ##
27+
zgen oh-my-zsh plugins/fzf # https://github.com/ohmyzsh/ohmyzsh/issues/12412
28+
zgen oh-my-zsh plugins/command-not-found
2629

27-
if [ -z "$RUNNING_IN_VSCODE" ]; then
28-
zgen oh-my-zsh plugins/docker-compose
29-
zgen oh-my-zsh plugins/aws
30-
zgen oh-my-zsh plugins/colored-man-pages
31-
zgen oh-my-zsh plugins/gitfast
32-
fi
30+
if [ -z "$RUNNING_IN_VSCODE" ]; then
31+
zgen oh-my-zsh plugins/docker-compose
32+
zgen oh-my-zsh plugins/aws
33+
zgen oh-my-zsh plugins/colored-man-pages
34+
zgen oh-my-zsh plugins/gitfast
35+
fi
3336

34-
## load normal plugins ##
35-
zgen loadall <<EOPLUGINS
36-
zsh-users/zsh-completions src
37-
zsh-users/zsh-autosuggestions
38-
zsh-users/zsh-history-substring-search
39-
zdharma-continuum/fast-syntax-highlighting
37+
## load normal plugins ##
38+
zgen loadall <<EOPLUGINS
39+
zsh-users/zsh-completions src
40+
zsh-users/zsh-autosuggestions
41+
zsh-users/zsh-history-substring-search
42+
zdharma-continuum/fast-syntax-highlighting
4043
EOPLUGINS
4144

42-
if [ -z "$RUNNING_IN_VSCODE" ]; then
43-
zgen loadall <<EOPLUGINS
45+
if [ -z "$RUNNING_IN_VSCODE" ]; then
46+
zgen loadall <<EOPLUGINS
4447

45-
# git related
46-
peterhurford/git-it-on.zsh
47-
bigH/git-fuzzy
48+
# git related
49+
peterhurford/git-it-on.zsh
50+
bigH/git-fuzzy
4851
EOPLUGINS
4952
fi
5053

51-
# save zgen cache
52-
zgen save
54+
# save zgen cache
55+
zgen save
56+
57+
rmdir "$_zgen_lockdir" 2>/dev/null
58+
trap - EXIT INT TERM
59+
else
60+
# Another shell is already regenerating init.zsh - warn if the lock looks stale
61+
zmodload -F zsh/stat b:zstat 2>/dev/null
62+
if [[ -d "$_zgen_lockdir" ]]; then
63+
_lock_mtime=$(zstat +mtime "$_zgen_lockdir" 2>/dev/null)
64+
if [[ -n "$_lock_mtime" ]] && (( EPOCHSECONDS - _lock_mtime > 60 )); then
65+
echo "zgen: stale lock detected ($(( EPOCHSECONDS - _lock_mtime ))s old). Run: rmdir ~/.zgen/init.zsh.lock" >&2
66+
fi
67+
unset _lock_mtime
68+
fi
69+
fi
70+
unset _zgen_lockdir
5371
fi
5472

16-ai.rc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ alias ccrd='ccr --dangerously-skip-permissions'
3939
alias ccra='CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 ccrd'
4040
alias claude-history='claude-code-viewer' # requires: pnpm install -g @kimuson/claude-code-viewer@latest
4141

42+
alias oc='opencode'
43+
4244
# Claude Code non-interactive functions
4345
alias '??'='claude_helper'
4446
alias '??!'='claude_helper_exec'
@@ -288,3 +290,9 @@ EOF
288290
# local -r prompt=$(git diff --cached --name-only | xargs -I{} echo "Why did you change {}?")
289291
# local -r api_url="http://localhost:11434/api/generate"
290292
# }
293+
294+
# Commands that only run within Claude Code sessions
295+
# if [[ -n "$CLAUDECODE" ]]; then
296+
297+
# eval "$(direnv hook zsh)" # https://github.com/direnv/direnv
298+
# fi

4-aliases.rc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ alias gitwip="git add .; git commit -m '[automated commit or incremental update]
5656
alias hotfix-checkout="checkout-hotfix"
5757
alias hotfix-commit="commit-hotfix"
5858
alias hotfix="checkout-hotfix"
59-
alias L="ls -ltarh"
59+
alias ll="ls -ltarh"
6060
alias j="checkout-jira"
6161
alias jira-checkout="checkout-jira"
6262
alias jira-commit="commit-jira"
@@ -180,6 +180,7 @@ alias -s {jpg,jpeg,png,gif,bmp,ico,svg,webp}=open
180180

181181
# Glow for Markdown
182182
alias -s md=glow
183+
alias mdpdf='~/.claude/skills/extract-wisdom/scripts/render_pdf.sh'
183184

184185
# Networking
185186
alias ip6="curl -s 6.ipquail.com/ip"

5-exports.rc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,5 @@ export FFMPEG_DIR="/opt/homebrew/opt/ffmpeg"
8181
# Custom user locate path
8282
export LOCATE_PATH="$HOME/.locatedb"
8383

84+
# opencode
85+
export PATH=/Users/samm/.opencode/bin:$PATH

9-functions.rc

Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,12 +1442,12 @@ nas_dcup() {
14421442
# Yazi https://github.com/sxyazi/yazi
14431443
# https://github.com/sxyazi/yazi/tree/main/config/docs
14441444
function y() {
1445-
tmp="$(mktemp -t "yazi-cwd.XXXXX")"
1446-
yazi --cwd-file="$tmp"
1447-
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
1448-
cd -- "$cwd"
1449-
fi
1450-
rm -f -- "$tmp"
1445+
local tmp
1446+
tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
1447+
command yazi "$@" --cwd-file="$tmp"
1448+
IFS= read -r -d '' cwd < "$tmp"
1449+
[ "$cwd" != "$PWD" ] && [ -d "$cwd" ] && builtin cd -- "$cwd"
1450+
rm -f -- "$tmp"
14511451
}
14521452

14531453
function brewbackup() {
@@ -1717,6 +1717,7 @@ EOF
17171717
echo "source $aws_creds_file"
17181718
}
17191719
alias aws-ai="aws-sso aisandpit"
1720+
alias aws-kbdev="aws-sso kb-dev"
17201721
# shellcheck disable=SC2139
17211722
alias awl="source ${HOME}/.tmp/awltmp"
17221723

@@ -1773,31 +1774,6 @@ cline-workflows() {
17731774
cp -r $SOURCE_DIR/*.md $DEST_DIR/
17741775
}
17751776

1776-
# Track previous directory for z - / cd - functionality
1777-
# Uses chpwd hook so it works with z, cd, pushd, etc.
1778-
typeset -g _ZOXIDE_OLDPWD="$PWD"
1779-
typeset -g _ZOXIDE_CURPWD="$PWD"
1780-
1781-
_track_directory() {
1782-
_ZOXIDE_OLDPWD="$_ZOXIDE_CURPWD"
1783-
_ZOXIDE_CURPWD="$PWD"
1784-
}
1785-
autoload -Uz add-zsh-hook
1786-
add-zsh-hook chpwd _track_directory
1787-
1788-
# Go to previous directory with z -
1789-
z() {
1790-
if [[ "$1" == "-" ]]; then
1791-
if [[ -n "$_ZOXIDE_OLDPWD" && -d "$_ZOXIDE_OLDPWD" ]]; then
1792-
__zoxide_z "$_ZOXIDE_OLDPWD"
1793-
else
1794-
echo "z: no previous directory" >&2
1795-
return 1
1796-
fi
1797-
else
1798-
__zoxide_z "$@"
1799-
fi
1800-
}
18011777

18021778

18031779
# Quick navigation to git repositories, optionally taking a subdirectory as an argument
@@ -1847,7 +1823,8 @@ npm-global-update() {
18471823
# TODO: switch to pnpm, detect if packages are installed with pnpm or npm and use the appropriate tool or migrated npm packages to pnpm
18481824
# Define allowed package patterns (substring matches)
18491825
local allowed_patterns
1850-
allowed_patterns=("@anthropic-ai/claude-code" "@google/gemini-cli" "@qwen-code/qwen-code" "ccstatusline" "claude-code-router" "claudekit" "ccusage" "npm-check-updates" "playwright" "ccexp" "vibe-kanban" "@vscode/vsce" "yaml-language-server" "typescript-language-server" "typescript" "corepack" "npm" "pnpm" "jest" "tweakcc" "@modelcontextprotocol/inspector" "happy-coder" "@github/copilot" "cline@nightly" "cline" "@anthropic-ai/sandbox-runtime" "@kimuson/claude-code-viewer@latest" "@mermaid-js/mermaid-cli")
1826+
allowed_patterns=("@anthropic-ai/claude-code" "@google/gemini-cli" "@qwen-code/qwen-code" "ccstatusline" "claude-code-router" "claudekit" "ccusage" "npm-check-updates" "playwright" "ccexp" "vibe-kanban" "@vscode/vsce" "yaml-language-server" "typescript-language-server" "typescript" "corepack" "npm" "pnpm" "jest" "tweakcc" "@modelcontextprotocol/inspector" "happy-coder" "@github/copilot" "cline@nightly" "cline" "@anthropic-ai/sandbox-runtime" "@kimuson/claude-code-viewer@latest" "@mermaid-js/mermaid-cli"
1827+
"@googleworkspace/cli")
18511828

18521829
cspell_packages=( "cspell" "@cspell/dict-en-au" "@cspell/dict-en-gb" "@cspell/dict-companies" "@cspell/dict-html"
18531830
"@cspell/dict-python" "@cspell/dict-rust" "@cspell/dict-typescript" "@cspell/dict-node" "@cspell/dict-terraform"

ghostty-config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ font-size = 15
8080
font-feature = -calt
8181

8282
cursor-text = #000000
83-
auto-update = check
83+
#auto-update = check
8484
auto-update-channel = tip
8585
quit-after-last-window-closed = false
8686

zshrc

Lines changed: 38 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,6 @@ fi
105105
# fi
106106
# <<< conda initialize <<<
107107

108-
### zoxide ###
109-
if [ -z "$RUNNING_IN_VSCODE" ]; then
110-
eval "$(zoxide init zsh)"
111-
fi
112-
### zoxide ###
113-
114108
# Load custom aliases
115109
export PATH="$PATH:/Users/samm/Fltr"
116110

@@ -132,13 +126,6 @@ export PATH="/opt/homebrew/opt/tcl-tk@8/bin:$PATH"
132126
# The next line enables shell command completion for gcloud.
133127
# if [ -f '/Users/samm/Downloads/google-cloud-sdk/completion.zsh.inc' ] && if_not_in_vscode; then . '/Users/samm/Downloads/google-cloud-sdk/completion.zsh.inc'; fi
134128

135-
# # Amazon Q post block. Keep at the bottom of this file.
136-
if [[ "$LOADING_Q" == "true" ]]; then
137-
# Amazon Q post block. Keep at the bottom of this file.
138-
# This is in an if statement because Amazon Q / Kiro CLI is _really_ poorly written and slows down your terminal
139-
# See https://github.com/aws/amazon-q-developer-cli/discussions/202
140-
[[ -f "${HOME}/Library/Application Support/kiro-cli/shell/zshrc.post.zsh" ]] && builtin source "${HOME}/Library/Application Support/kiro-cli/shell/zshrc.post.zsh"
141-
fi
142129

143130
# ####### PROFILING #######
144131
# # Uncomment below to enable debug timing
@@ -159,5 +146,41 @@ export PATH="$HOME/.local/bin:$PATH"
159146
# Added by Antigravity
160147
# export PATH="/Users/samm/.antigravity/antigravity/bin:$PATH"
161148

162-
# opencode
163-
export PATH=/Users/samm/.opencode/bin:$PATH
149+
### zoxide ###
150+
if [ -z "$RUNNING_IN_VSCODE" ]; then
151+
eval "$(zoxide init zsh)"
152+
153+
# Override z to support z - (go to previous directory)
154+
typeset -g _ZOXIDE_OLDPWD="$PWD"
155+
typeset -g _ZOXIDE_CURPWD="$PWD"
156+
157+
_track_directory() {
158+
_ZOXIDE_OLDPWD="$_ZOXIDE_CURPWD"
159+
_ZOXIDE_CURPWD="$PWD"
160+
}
161+
autoload -Uz add-zsh-hook
162+
add-zsh-hook chpwd _track_directory
163+
164+
z() {
165+
if [[ "$1" == "-" ]]; then
166+
if [[ -n "$_ZOXIDE_OLDPWD" && -d "$_ZOXIDE_OLDPWD" ]]; then
167+
__zoxide_z "$_ZOXIDE_OLDPWD"
168+
else
169+
echo "z: no previous directory" >&2
170+
return 1
171+
fi
172+
else
173+
__zoxide_z "$@"
174+
fi
175+
}
176+
fi
177+
### zoxide ###
178+
179+
180+
# # Amazon Q post block. Keep at the bottom of this file.
181+
if [[ "$LOADING_Q" == "true" ]]; then
182+
# Amazon Q post block. Keep at the bottom of this file.
183+
# This is in an if statement because Amazon Q / Kiro CLI is _really_ poorly written and slows down your terminal
184+
# See https://github.com/aws/amazon-q-developer-cli/discussions/202
185+
[[ -f "${HOME}/Library/Application Support/kiro-cli/shell/zshrc.post.zsh" ]] && builtin source "${HOME}/Library/Application Support/kiro-cli/shell/zshrc.post.zsh"
186+
fi

0 commit comments

Comments
 (0)