From 4c3c8ebe1d70d11b6905df5892c4cbe9e3fc9fd4 Mon Sep 17 00:00:00 2001 From: "Eshan Roy (Eshanized)" <148610067+eshanized@users.noreply.github.com> Date: Sun, 16 Jun 2024 02:22:07 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20[fix(script)]=20place=20emojis?= =?UTF-8?q?=20at=20the=20begining?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- push.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/push.sh b/push.sh index dfab264..5f28429 100755 --- a/push.sh +++ b/push.sh @@ -1,7 +1,7 @@ #!/bin/bash # Define the conventional commit types with emojis -TYPES=("feat ๐ŸŽ‰" "fix ๐Ÿž" "docs ๐Ÿ“š" "style ๐Ÿ’…" "refactor ๐Ÿ”จ" "perf โšก๏ธ" "test ๐Ÿงช" "build ๐Ÿ› ๏ธ" "ci ๐Ÿค–" "chore ๐Ÿงน" "revert โช๏ธ") +TYPES=("๐ŸŽ‰ feat" "๐Ÿž fix" "๐Ÿ“š docs" "๐Ÿ’… style" "๐Ÿ”จ refactor" "โšก๏ธ perf" "๐Ÿงช test" "๐Ÿ› ๏ธ build" "๐Ÿค– ci" "๐Ÿงน chore" "โช๏ธ revert") # Prompt the user to select a commit type echo "Select a commit type:" @@ -11,8 +11,8 @@ done # Extract the commit type and emoji from the selection type_emoji=${type} -type=${type_emoji% *} -emoji=${type_emoji#* } +type=${type_emoji#* } +emoji=${type_emoji% *} # Prompt the user to enter a scope (optional) read -p "Enter a scope (optional): " scope @@ -24,7 +24,7 @@ read -p "Enter a short description: " desc read -p "Enter a longer description (optional): " long_desc # Create the commit message -commit_msg="[$type($scope)] $desc $emoji" +commit_msg="$emoji [$type($scope)] $desc" # If a longer description was provided, add it to the commit message if [ -n "$long_desc" ]; then