dotfiles/.zshrc
mwiegand 450b58c2a5
refactor: agents/ moves to ~/Projekte/ai-config
.zshrc sources agent-env.zsh from there; README points to the new home.
History of the moved files stays here up to e000cfe.

Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
2026-10-09 23:21:57 +02:00

44 lines
1.1 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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 "$HOME/Projekte/ai-config/agents/agent-env.zsh"