2026-02-11

This commit is contained in:
2026-02-11 09:38:52 -05:00
parent 4361c5f17b
commit 967565c80b
2 changed files with 69 additions and 4 deletions
+5 -1
View File
@@ -97,6 +97,8 @@ cask "arq"
cask "ghall89/tap/autodock"
cask "bbedit"
cask "bettershot"
cask "coderabbit"
cask "codex"
cask "contexts"
cask "cork"
cask "daisydisk"
@@ -108,6 +110,7 @@ cask "equinox"
cask "find-any-file"
cask "fork"
cask "forklift"
cask "freetube"
cask "gb-studio"
cask "ghostty"
cask "hazel"
@@ -148,6 +151,7 @@ cask "vscodium"
cask "whatsapp"
cask "windowkeys"
cask "xscope"
cask "yattee"
cask "zen"
cask "zoom"
mas "Actions", id: 1586435171
@@ -172,8 +176,8 @@ mas "Folder Quick Look", id: 6753110395
mas "Front and Center", id: 1493996622
mas "Gifski", id: 1351639930
mas "HEIC Converter", id: 1294126402
mas "Ice Cubes", id: 6444915884
mas "Interactful", id: 1528095640
mas "Ivory", id: 6444602274
mas "JSON Peep", id: 1458969831
mas "Key Codes", id: 414568915
mas "Keynote", id: 361285480
+64 -3
View File
@@ -1,7 +1,68 @@
#!/bin/bash
set -euo pipefail
git add -A
gitmoji commit
# Show modified + untracked files and let user pick (multi-select)
# Use NUL-safe listing then convert to newlines for gum
selected=$(git ls-files -m -o --exclude-standard -z | tr '\0' '\n' | gum choose --no-limit) || true
if [ -z "$selected" ]; then
echo "No files selected; aborting."
exit 0
fi
# Stage each selected file (handle spaces/newlines safely)
while IFS= read -r file; do
# skip empty lines (defensive)
[ -n "$file" ] || continue
git add -- "$file"
done <<< "$selected"
# Helper to unstage only the files we added
unstage_added() {
if [ "${#added[@]}" -gt 0 ]; then
git reset -- "${added[@]}"
fi
}
# If nothing is staged, abort (don't commit or push)
if ! git diff --cached --name-only | grep -q .; then
echo "No files staged after selection; aborting."
exit 0
fi
# Commit using gum for message/summary
# Prompt for a short summary (single-line)
SUMMARY="$(gum input --placeholder "Summary of this change" --value "")" || true
# If the user cancelled or left it empty, unstage and abort
if [ -z "$SUMMARY" ]; then
echo "No summary provided; aborting and unstaging changes."
unstage_added
exit 0
fi
# Prompt for a longer description (multi-line)
DESCRIPTION="$(gum write --placeholder "Details of this change (optional)")" || true
# Confirm before committing
if ! gum confirm "Commit with summary: \"$SUMMARY\"?"; then
echo "Commit cancelled; unstaging changes."
unstage_added
exit 0
fi
# Perform the commit (description as second -m if present)
if [ -n "$DESCRIPTION" ]; then
git commit -m "$SUMMARY" -m "$DESCRIPTION"
else
git commit -m "$SUMMARY"
fi
BRANCH=$(git name-rev --name-only HEAD)
gum confirm "Push?" && git push origin $BRANCH
# Only push if a remote named "origin" exists
if git config --get remote.origin.url >/dev/null 2>&1; then
git push origin "$BRANCH"
else
echo "No remote 'origin' found; skipping git push."
fi