mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2025-12-15 11:50:41 +01:00
feat(template.sh): add limit counter for short desc
Limit character for short descriptions is 50.
This commit is contained in:
@@ -70,8 +70,12 @@ a file name, function name, class name, component name etc.\n\n"
|
|||||||
|
|
||||||
while :; do
|
while :; do
|
||||||
read -e short_desc
|
read -e short_desc
|
||||||
|
limit_counter=${#short_desc}
|
||||||
if [ -z "$short_desc" ]; then
|
if [ -z "$short_desc" ]; then
|
||||||
printf "${RED}❌ Short description can not be empty.${RESET}\n"
|
printf "${RED}❌ Short description can not be empty.${RESET}\n"
|
||||||
|
elif [[ $limit_counter > 50 ]]; then
|
||||||
|
printf "${RED}❌ The maximum character for header is 50, Please\
|
||||||
|
provide details in long descriptions.${RESET}\n"
|
||||||
else
|
else
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user