commit f68ecbcf4b7fac988632e6f3e9f4e15fbe5a5d8e
parent 09a96b7e125f3c382d2f5a32d7b2b52f2087a30b
Author: Wilson Gheen <wilson@wilsonrgheen.com>
Date:   Mon, 21 Mar 2022 15:32:43 -0500
typos
Diffstat:
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
@@ -74,7 +74,7 @@ usage: bbl [flags] [bible] [reference...]
 ## Note
 
 The default behaviour (without a flag to specify the Bible version) is to print from the Knox Bible.
-This is easy to change by changing the line before the default of the main case statement (close to line 125) of bbl.sh (set_bible knx) to reflect the three-letter abbreviation of your translation of choice.
+To change this, set the environment variable "DEFAULT_BIBLE" to reflect the three-letter abbreviation of your translation of choice.
 One can easily extend this program ad nauseam by simply adding new .tsv files and updating the getopt and the case statement in bbl.sh accordingly.
 
 ## Install
diff --git a/bbl.sh b/bbl.sh
@@ -4,7 +4,6 @@
 
 SELF="$0"
 BIBLE=""
-DEFAULT_BIBLE="knx" # Use Knox Bible if none is specified in command line options
 
 get_data() {
 	sed '1,/^#EOF$/d' < "$SELF" | tar xz -O "$1"
@@ -43,10 +42,13 @@ show_help() {
         echo "  -r, --rsv               Revised Standard Version: Catholic Edition"
 	echo "  -v, --vulgate           Clementine Vulgate"
     echo
-    echo " Specify multiple versions to cross-reference (view them in multi-column fashion). This feature is not yet available for languages that are read right-to-left. Specifying -i or -H will currently override all other translations and output only the Hebrew Bible."
+    echo "Specify multiple versions to cross-reference (view them in multi-column fashion)."
+    echo "This feature is not yet available for languages that are read right-to-left."
+    echo "Specifying -i or -H will currently override all other translations and output only the Hebrew Bible."
 	echo
 	echo "  Reference types:"
-    echo "  NOTE: The colon between book and chapter is required for Hebrew, optional for everything else. References for Hebrew must be in Hebrew; for all else, must be in English."
+    echo "  NOTE: The colon between book and chapter is required for Hebrew, optional for everything else."
+    echo " References for Hebrew must be in Hebrew; for all else, must be in English."
 	echo "      <Book>"
 	echo "          Individual book"
 	echo "      <Book>:<Chapter>"
@@ -89,6 +91,9 @@ set_bible() {
         BIBLE=${BIBLE}" "$1
     fi
 }
+default_bible() {
+    [ "$DEFAULT_BIBLE" ] && BIBLE="$DEFAULT_BIBLE" || BIBLE="knx"
+}
 
 lang="en" # Language of text being used--most are English
 list=""
@@ -167,7 +172,7 @@ done
 # TODO cross-referencing is not yet available with Hebrew
 echo "$BIBLE" | grep -q 'heb' && BIBLE='heb'
 
-[ -z "$BIBLE" ] && set_bible $DEFAULT_BIBLE
+[ -z "$BIBLE" ] && default_bible
 
 if [ "$list" ]; then
     get_data "$(echo "${BIBLE}" | cut -d " " -f 1).tsv" | awk -v cmd=list "$(get_data bbl.awk)" | ${PAGER}