Die imperative Hälfte der Key-Architektur lag unversioniert in ~/.zshrc und ~/.local/bin, während die deklarative (.env.agents) getrackt war. Jetzt liegt alles Agent-bezogene hier: - agents/agent-env.zsh — SSH_AUTH_SOCK + agent-env(), gesourced von .zshrc - agents/ensure-machine-agent — startet den Maschinen-Agent und stellt beide Keys sicher (ersetzt load-signing-key, das nur den Signing-Key kannte, während agent-env separat den Agent-Key lud) - agents/README.md — Design-Doc, verschoben aus dem ai-Repo zum Code .env.agents bleibt rein deklarativ, weil op run --env-file die Datei nur parst und keinen Code ausführt — daher die Zweiteilung. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012aD7fG6BpN1HchyHeNXZb4
44 lines
1 KiB
Bash
44 lines
1 KiB
Bash
setopt prompt_subst
|
||
|
||
autoload -Uz colors
|
||
colors
|
||
|
||
fpath=(~/.zfunc $fpath)
|
||
autoload -Uz compinit
|
||
compinit
|
||
|
||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
|
||
|
||
precmd() {
|
||
local exit_code=$?
|
||
local prompt_git_branch
|
||
|
||
prompt_git_branch=$(git symbolic-ref --quiet --short HEAD 2>/dev/null)
|
||
if [[ -n $prompt_git_branch ]]; then
|
||
PROMPT_GIT_SEGMENT=$'%{\e[2m%}('"${prompt_git_branch}"$')%{\e[22m%}'
|
||
else
|
||
PROMPT_GIT_SEGMENT=''
|
||
fi
|
||
|
||
if (( exit_code == 0 )); then
|
||
PROMPT_ARROW_COLOR='%F{22}'
|
||
else
|
||
PROMPT_ARROW_COLOR='%F{red}'
|
||
fi
|
||
}
|
||
|
||
PROMPT='%B%1~%b${PROMPT_GIT_SEGMENT}${PROMPT_ARROW_COLOR}%B❯%b%f '
|
||
|
||
source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||
|
||
autoload -Uz up-line-or-beginning-search
|
||
autoload -Uz down-line-or-beginning-search
|
||
zle -N up-line-or-beginning-search
|
||
zle -N down-line-or-beginning-search
|
||
|
||
bindkey '^[[A' up-line-or-beginning-search
|
||
bindkey '^[[B' down-line-or-beginning-search
|
||
bindkey '^[OA' up-line-or-beginning-search
|
||
bindkey '^[OB' down-line-or-beginning-search
|
||
|
||
source "${0:a:h}/agents/agent-env.zsh"
|