mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-23 22:30:07 +00:00
feat(template.sh): add limit counter for short desc
Limit character for short descriptions is 50.
This commit is contained in:
parent
0e1841b6d6
commit
882c1d52ce
1 changed files with 4 additions and 0 deletions
|
@ -70,8 +70,12 @@ a file name, function name, class name, component name etc.\n\n"
|
|||
|
||||
while :; do
|
||||
read -e short_desc
|
||||
limit_counter=${#short_desc}
|
||||
if [ -z "$short_desc" ]; then
|
||||
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
|
||||
break
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue