From 9fc65ddc209318db1d4d9121e458d67cccf89fa0 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Tue, 6 Dec 2022 23:23:20 +0300 Subject: feat(bin): add yc script uses gum to be fancy will keep rest of the dotfiles repository commit messages consistent, hopefully --- .local/bin/yc | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 .local/bin/yc (limited to '.local/bin/yc') diff --git a/.local/bin/yc b/.local/bin/yc new file mode 100755 index 0000000..c0108cf --- /dev/null +++ b/.local/bin/yc @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +TYPE=$(gum choose "fix" "feat" "docs" "style" "refactor" "test" "chore" "revert") +SCOPE=$(gum input --placeholder "scope") + +test -n "$SCOPE" && SCOPE="($SCOPE)" + +SUMMARY=$(gum input --value "$TYPE$SCOPE: " --placeholder "summary of this change") +DESCRIPTION=$(gum write --placeholder "details of this change ( to finish)") + +gum confirm "commit changes?" && yadm commit -m "$SUMMARY" -m "$DESCRIPTION" -- cgit v1.2.3-70-g09d2