diff --git a/flash b/flash index 5daba40..114f72e 100755 --- a/flash +++ b/flash @@ -220,6 +220,9 @@ done # Show pretty FZF preview of decks using $PREVIEWER. Default: BAT DECK="$(find . -maxdepth "$SEARCH_DEPTH" -iname "*.csv" | fzf --preview="$PREVIEWER $PREVIEWER_PARAMTERS {} | head -500")" +# Get current deck name for display +CURRENT_DECK="$(echo "$DECK" | awk -F/ '{print $NF}')" + # If no deck is selected in fzf menu # return user to start location # and exit quietly @@ -233,6 +236,7 @@ main(){ read -a q <<< "$(sort "$DECK" -n --field-separator=: --key=4 | head -n "$CARD_POOL_SIZE"| shuf -n 1)" clear echo -e "${WHITEBG} Fla.sh - Flash Cards In Your Terminal ${NC} +${ORANGE}${BOLD} Current Deck:${BOLD}${NC}\t$CURRENT_DECK ${ORANGE}${BOLD}Cards Reviewed:${BOLD}${NC}\t$COUNTER \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") @@ -250,6 +254,7 @@ ${LGREY}Press [Enter] to continue...${NC}" done clear echo -e "${WHITEBG} Fla.sh - Flash Cards In Your Terminal ${NC} +${ORANGE}${BOLD} Current Deck:${BOLD}${NC}\t$CURRENT_DECK ${ORANGE}${BOLD}Cards Reviewed:${BOLD}${NC}\t$COUNTER \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")