Add opt to quit at question screen & clear output
This commit is contained in:
parent
10ac67e47c
commit
2f6e8b6c11
8
flash
8
flash
|
|
@ -48,8 +48,8 @@
|
||||||
OS="$(uname)"
|
OS="$(uname)"
|
||||||
case "$OS" in
|
case "$OS" in
|
||||||
"Darwin") DIR="$HOME/Library/Application Support/flash" ;;
|
"Darwin") DIR="$HOME/Library/Application Support/flash" ;;
|
||||||
"Linux") DIR="$HOME/.local/share/flash" ;;
|
"Linux") DIR="${XDG_DATA_HOME:-$HOME/.local/share}/flash" ;;
|
||||||
*) DIR="$HOME/.local/share/flash" ;;
|
*) DIR="${XDG_DATA_HOME:-$HOME/.local/share}/flash" ;;
|
||||||
esac
|
esac
|
||||||
# Where the example deck will be placed and named
|
# Where the example deck will be placed and named
|
||||||
EXAMPLE_DECK="$DIR/deck.csv"
|
EXAMPLE_DECK="$DIR/deck.csv"
|
||||||
|
|
@ -166,7 +166,7 @@ main(){
|
||||||
echo -e ""
|
echo -e ""
|
||||||
echo -e "${LGREY}Press [Enter] to continue...${NC}"
|
echo -e "${LGREY}Press [Enter] to continue...${NC}"
|
||||||
read -sn 1 NEXT
|
read -sn 1 NEXT
|
||||||
while [ ! "$NEXT" = "" ]; do
|
while [ ! "$NEXT" = "" ] && [ ! "$NEXT" = q ] && [ ! "$NEXT" = Q ]; do
|
||||||
read -sn 1 NEXT
|
read -sn 1 NEXT
|
||||||
done
|
done
|
||||||
clear
|
clear
|
||||||
|
|
@ -179,7 +179,7 @@ main(){
|
||||||
echo -e "${LGREY}Question:${NC}\n\t\t${q[1]}"
|
echo -e "${LGREY}Question:${NC}\n\t\t${q[1]}"
|
||||||
echo -e ""
|
echo -e ""
|
||||||
if [ "$NEXT" = q ] || [ "$NEXT" = Q ]; then
|
if [ "$NEXT" = q ] || [ "$NEXT" = Q ]; then
|
||||||
add_usage_entry && cd "$PWD" && exit
|
add_usage_entry && cd "$PWD" && clear && exit
|
||||||
fi
|
fi
|
||||||
echo -e "${LGREY}Answer:${NC}\n\t\t${q[2]}"
|
echo -e "${LGREY}Answer:${NC}\n\t\t${q[2]}"
|
||||||
echo -e ""
|
echo -e ""
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue