dotfiles/.zshrc
2026-04-19 15:53:36 +02:00

93 lines
2.2 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.

# open file limit
ulimit -S -n 24000
# brew
eval "$(/opt/homebrew/bin/brew shellenv)"
# rbenv
eval "$(rbenv init -)"
# pyenv
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
# direnv
eval "$(direnv hook zsh)"
# //S/M
smhss() {
echo "$(tr '.' "\n" <<< "$1" | tail -r | xargs | tr ' ' ".").smhss.de"
}
sshn() {
hostname=$(smhss $1)
shift
ssh $hostname $*
}
pingn() {
hostname=$(smhss $1)
shift
ping $hostname $*
}
# uv
#alias pip="uv pip"
#alias pip3="uv pip"
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/opt/homebrew/share/google-cloud-sdk/path.zsh.inc' ]; then . '/opt/homebrew/share/google-cloud-sdk/path.zsh.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/opt/homebrew/share/google-cloud-sdk/completion.zsh.inc' ]; then . '/opt/homebrew/share/google-cloud-sdk/completion.zsh.inc'; fi
alias edit="code -n"
# claude
#export CLAUDE_CODE_USE_VERTEX=1
#export CLOUD_ML_REGION=europe-west1
#export ANTHROPIC_VERTEX_PROJECT_ID=seibert-recruiting-ai
#export ANTHROPIC_MODEL='claude-sonnet-4-6'
#export ANTHROPIC_SMALL_FAST_MODEL='claude-haiku-4-5'
# claud
export PATH="$HOME/.local/bin:$PATH"
# opencode
export PATH=/Users/mwiegand/.opencode/bin:$PATH
setopt prompt_subst
autoload -Uz colors
colors
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=" (${prompt_git_branch})"
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