zshrc: neue Tools im Cheatsheet; gitcheck: lazygit-Integration

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
rene 2026-03-27 13:08:44 +01:00
parent 5a9174d898
commit c4d9eeac6f
2 changed files with 26 additions and 0 deletions

View file

@ -85,6 +85,7 @@ unset IFS
total=0 total=0
dirty=0 dirty=0
clean=0 clean=0
dirty_repos=()
for gitdir in "${sorted_gitdirs[@]}"; do for gitdir in "${sorted_gitdirs[@]}"; do
repo_dir="${gitdir%/.git}" repo_dir="${gitdir%/.git}"
@ -113,6 +114,7 @@ for gitdir in "${sorted_gitdirs[@]}"; do
if $is_dirty; then if $is_dirty; then
((dirty++)) ((dirty++))
dirty_repos+=("$repo_dir")
else else
((clean++)) ((clean++))
$SHOW_ALL || continue $SHOW_ALL || continue
@ -155,5 +157,19 @@ if ((dirty == 0)); then
exit 0 exit 0
else else
echo "$dirty Repository(s) mit offenen Änderungen. ⚠️" echo "$dirty Repository(s) mit offenen Änderungen. ⚠️"
# lazygit anbieten wenn interaktiv und verfügbar
if [ -t 1 ] && command -v lazygit &>/dev/null && ((dirty > 0)); then
echo
for i in "${!dirty_repos[@]}"; do
printf " %s[%d]%s %s\n" "$C_CYAN" "$((i+1))" "$C_RESET" "${dirty_repos[$i]##*/}"
done
printf "\n Repo in lazygit öffnen? (1-%d / Enter zum Überspringen): " "${#dirty_repos[@]}"
read -r choice
if [[ "$choice" =~ ^[0-9]+$ ]] && ((choice >= 1 && choice <= ${#dirty_repos[@]})); then
lazygit -p "${dirty_repos[$((choice-1))]}"
fi
fi
exit 1 exit 1
fi fi

View file

@ -204,6 +204,16 @@ tools() {
ki skills Skills auflisten ki skills Skills auflisten
ki skill <name> -f <datei> Skill ausfuehren ki skill <name> -f <datei> Skill ausfuehren
NEUE TOOLS
────────────────────────────────────────────────────────────────
lg lazygit: Git-TUI (space=stage, c=commit, p=push, ?=Hilfe)
- einzelne Zeilen selektiv stagen
- interaktiver Rebase ohne scary Kommandos
git diff/log automatisch via delta (side-by-side, n/N=naechster Block)
Ctrl+R atuin: fuzzy History-Suche mit Zeitstempel + Exit-Code
mise use Tool-Versionen pro Projekt (mise use python@3.12)
Stats Menüleisten-Monitor (CPU/RAM/Netz/Akku)
SPASS SPASS
──────────────────────────────────────────────────────────────── ────────────────────────────────────────────────────────────────
cmatrix Matrix-Regen (q = quit) cmatrix Matrix-Regen (q = quit)