dotfiles/shell/scripts/gitCommit.sh
Nikurasu 3ccd5065b5
feat(Shell): Add Scripts
Add FFMPEG and git commit scripts
2023-11-27 10:43:47 +01:00

13 lines
592 B
Bash
Executable file

#!/bin/sh
TYPE=$(gum choose "fix" "feat" "docs" "style" "refactor" "test" "chore" "revert")
SCOPE=$(gum input --placeholder "scope")
# Since the scope is optional, wrap it in parentheses if it has a value.
test -n "$SCOPE" && SCOPE="($SCOPE)"
# Pre-populate the input with the type(scope): so that the user may change it
SUMMARY=$(gum input --value "$TYPE$SCOPE: " --placeholder "Summary of this change")
DESCRIPTION=$(gum write --placeholder "Details of this change (CTRL+D to finish)")
# Commit these changes
gum confirm "Commit changes?" && git commit -a -m "$SUMMARY" -m "$DESCRIPTION"