Files
dotfiles/dot_config/zsh/aliases.zsh
s0wlz (Matthias Puchstein) 8018b53353 feat: finalize migration to chezmoi and modernize configuration logic
- Modularize Hyprland config into hyprland.d/
- Implement infinitely scalable monitor/workspace logic using templates and loop-based data structures
- Consolidate host-specific configs (hyprlock, hyprpaper, waybar) into single templates
- Resolve waybar symlink conflict and fix template execution errors
- Integrate chezmoi data variables for scale, resolution, and peripherals
2025-12-27 22:52:43 +01:00

44 lines
2.0 KiB
Bash

# Basic git diff summarizer
alias gai-summary="git diff | ollama run git-change-g3n2b"
# Full git commit message generation pipeline
alias gai-msg="git diff --cached | ollama run git-change-g3n2b | ollama run git-commit-g3n2b"
# Alternative: analyze all changes (not just staged)
alias gai-all="git diff | ollama run git-change-g3n2b | ollama run git-commit-g3n2b"
# Interactive version - shows summary first, then generates commit message
alias gai-interactive='echo "=== DIFF SUMMARY ===" && git diff --cached | ollama run git-change-g3n2b && echo -e "\n=== COMMIT MESSAGE OPTIONS ===" && git diff --cached | ollama run git-change-g3n2b | ollama run git-commit-g3n2b'
# Shorter aliases for frequent use
alias gaids="git diff --cached | ollama run git-change-g3n2b"
alias gaicm="git diff --cached | ollama run git-change-g3n2b | ollama run git-commit-g3n2b"
# Function for creating commit with AI-generated message
gai-commit() {
if [[ -z $(git diff --cached --name-only) ]]; then
echo "No staged changes found. Stage your changes first with 'git add'."
return 1
fi
echo "Analyzing staged changes..."
local commit_msg=$(git diff --cached | ollama run git-diff-summarizer | ollama run commit-msg-generator)
echo -e "\nGenerated commit message:\n$commit_msg"
echo -e "\nProceed with this commit? (y/n)"
read -r response
if [[ "$response" =~ ^[Yy]$ ]]; then
git commit -m "$commit_msg"
echo "Committed successfully!"
else
echo "Commit cancelled."
fi
}
# Interactive version - shows summary first, then generates commit message
alias yadmai-interactive='echo "=== DIFF SUMMARY ===" && yadm diff --staged | ollama run git-change-g3n2b && echo -e "\n=== COMMIT MESSAGE OPTIONS ===" && yadm diff --staged | ollama run git-change-g3n2b | ollama run git-commit-g3n2b'
# Full git commit message generation pipeline
alias yadmai-msg="yadm diff --staged | ollama run git-change-g3n2b | ollama run git-commit-g3n2b"