travis
This commit is contained in:
parent
d7ddb7595f
commit
6e80a1b1eb
10
flash
10
flash
|
|
@ -230,9 +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 --spaces --width=59)
|
||||||
printf "${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
|
||||||
\t${ORANGE}${BOLD}High Score:${BOLD}${NC}\t$(cat "$HIGH_SCORE")
|
\t${ORANGE}${BOLD}High Score:${BOLD}${NC}\t$(cat "$HIGH_SCORE")
|
||||||
\t${ORANGE}${BOLD}Avg review:${BOLD}${NC}\t$(awk '{ sum += $7; n++ } END { if (n > 0) print sum / n; }' "$REVIEW_LOG")
|
\t${ORANGE}${BOLD}Avg review:${BOLD}${NC}\t$(awk '{ sum += $7; n++ } END { if (n > 0) print sum / n; }' "$REVIEW_LOG")
|
||||||
|
|
@ -281,8 +281,8 @@ ${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 --spaces --width=59)
|
||||||
printf "___________________________________________________________
|
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
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue