diff options
author | Yigit Sever | 2022-12-06 23:23:20 +0300 |
---|---|---|
committer | Yigit Sever | 2022-12-06 23:23:20 +0300 |
commit | 9fc65ddc209318db1d4d9121e458d67cccf89fa0 (patch) | |
tree | 5c583af1ac49fc31ab16f60f89e09ee90cb661e2 /.local/bin/yc | |
parent | 6f0a28e57835362a4a8222ee072563a4ba25e8da (diff) | |
download | dotfiles-9fc65ddc209318db1d4d9121e458d67cccf89fa0.tar.gz dotfiles-9fc65ddc209318db1d4d9121e458d67cccf89fa0.tar.bz2 dotfiles-9fc65ddc209318db1d4d9121e458d67cccf89fa0.zip |
feat(bin): add yc script
uses gum to be fancy
will keep rest of the dotfiles repository commit messages consistent, hopefully
Diffstat (limited to '.local/bin/yc')
-rwxr-xr-x | .local/bin/yc | 11 |
1 files changed, 11 insertions, 0 deletions
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 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | |||
3 | TYPE=$(gum choose "fix" "feat" "docs" "style" "refactor" "test" "chore" "revert") | ||
4 | SCOPE=$(gum input --placeholder "scope") | ||
5 | |||
6 | test -n "$SCOPE" && SCOPE="($SCOPE)" | ||
7 | |||
8 | SUMMARY=$(gum input --value "$TYPE$SCOPE: " --placeholder "summary of this change") | ||
9 | DESCRIPTION=$(gum write --placeholder "details of this change (<C-d> to finish)") | ||
10 | |||
11 | gum confirm "commit changes?" && yadm commit -m "$SUMMARY" -m "$DESCRIPTION" | ||