Files
dotfiles/zshrc_template
2026-02-10 14:03:30 +01:00

72 lines
1.7 KiB
Plaintext

# --- OH MY ZSH SETUP ---
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="agnoster"
# Plugins dynamisch nach Plattform laden
plugins=(git common-aliases)
if [[ "$OSTYPE" == "darwin"* ]]; then
plugins+=(macos brew)
fi
plugins+=(
zsh-completions
zsh-autosuggestions
zsh-syntax-highlighting
)
# Wichtig: zsh-completions FPATH setzen vor OMZ source
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
source $ZSH/oh-my-zsh.sh
# --- SYSTEM CONFIG ---
setopt INTERACTIVE_COMMENTS
export EDITOR=micro
export VISUAL=micro
# Keybindings für Home/End (wichtig für SSH & Rock 5B)
bindkey "\e[1~" beginning-of-line
bindkey "\e[4~" end-of-line
bindkey "\eOH" beginning-of-line
bindkey "\eOF" end-of-line
bindkey "\e[H" beginning-of-line
bindkey "\e[F" end-of-line
# --- PATH CONFIG (Universal) ---
export PATH="$HOME/.local/bin:/usr/local/bin:$PATH"
# Flutter (nur wenn Verzeichnis existiert)
if [ -d "$HOME/flutter/bin" ]; then
export PATH="$PATH:$HOME/flutter/bin"
fi
# Go (Universal)
if command -v go &>/dev/null; then
export PATH="$PATH:$(go env GOPATH)/bin"
fi
# Android SDK
export ANDROID_HOME=$HOME/Android/sdk
if [ -d "$ANDROID_HOME" ]; then
export PATH="$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator"
fi
# --- COMPLETION CACHING ---
autoload -Uz compinit
if [[ -n ${ZDOTDIR:-$HOME}/.zcompdump(#qN.mh+24) ]]; then
compinit
else
compinit -C
fi
zstyle ':completion:*' menu select
# --- FUNKTIONEN & ALIASE LADEN ---
# Dies lädt alles aus deinem neuen modularen Ordner
if [ -d "$HOME/.zsh_func_d" ]; then
for func_file in "$HOME/.zsh_func_d"/*; do
# Nur reguläre Dateien sourcen
[ -f "$func_file" ] && source "$func_file"
done
fi