Merge branch 'master' into master

This commit is contained in:
Bryan Jenks 2020-07-19 18:08:00 -07:00 committed by GitHub
commit 8f9519d4b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

8
flash
View File

@ -230,7 +230,9 @@ esac
# The top part of the flash display so that code is not duplicated twice # The top part of the flash display so that code is not duplicated twice
print_head(){ print_head(){
QUESTION=$(echo "${q[1]}" | fold --spaces --width=59)
QUESTION=$(echo "${q[1]}" | fold -w 59)
echo -e "${WHITEBG} Fla.sh - Flash Cards In Your Terminal ${NC} echo -e "${WHITEBG} Fla.sh - Flash Cards In Your Terminal ${NC}
${ORANGE}${BOLD} Current Deck:${BOLD}${NC}\t$(basename -s .csv "$CURRENT_DECK") ${ORANGE}${BOLD} Current Deck:${BOLD}${NC}\t$(basename -s .csv "$CURRENT_DECK")
${ORANGE}${BOLD}Cards Reviewed:${BOLD}${NC}\t$COUNTER ${ORANGE}${BOLD}Cards Reviewed:${BOLD}${NC}\t$COUNTER
@ -280,7 +282,9 @@ ${LGREY}──────────────── Press [Enter] to contin
if [ "$NEXT" = q ] || [ "$NEXT" = Q ]; then if [ "$NEXT" = q ] || [ "$NEXT" = Q ]; then
add_usage_entry && cd "$PWD" && clear && exit 0 add_usage_entry && cd "$PWD" && clear && exit 0
fi fi
ANSWER=$(echo "${q[2]}" | fold --spaces --width=59)
ANSWER=$(echo "${q[2]}" | fold -w 59)
echo -e "___________________________________________________________ echo -e "___________________________________________________________
$(if [ ${#ANSWER} -lt 59 ]; then printf "%$(( ( 59 - ${#ANSWER} ) / 2 ))s"; fi)$ANSWER $(if [ ${#ANSWER} -lt 59 ]; then printf "%$(( ( 59 - ${#ANSWER} ) / 2 ))s"; fi)$ANSWER