kjv

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit eb41fefb9c7c95544f17bd6c0346a4db57afe897
parent b1688d662a7c11afe566db5f3b53e6388b3f6502
Author: Tim Cooper <tim.cooper@layeh.com>
Date:   Sat, 22 Dec 2018 09:21:41 -0600

only support one reference in the arguments

This allows multi-word references to be passed easier to the program

Diffstat:
MREADME.md | 4++--
Mkjv.sh | 13+++----------
2 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/README.md b/README.md @@ -4,13 +4,13 @@ Read the Word of God from your terminal ## Usage - usage: ./kjv [flags] <references...> + usage: ./kjv [flags] [reference...] -l list books -W no line wrap -h show help - References types: + Reference types: <Book> Individual book <Book>:<Chapter> diff --git a/kjv.sh b/kjv.sh @@ -18,13 +18,13 @@ fi show_help() { exec >&2 - echo "usage: $(basename "$0") [flags] <references...>" + echo "usage: $(basename "$0") [flags] [reference...]" echo echo " -l list books" echo " -W no line wrap" echo " -h show help" echo - echo " References types:" + echo " Reference types:" echo " <Book>" echo " Individual book" echo " <Book>:<Chapter>" @@ -87,11 +87,4 @@ if [ $# -eq 0 ]; then exit 0 fi -startIdx=$# -(while [ $# -gt 0 ]; do - if [ "${startIdx}" -ne $# ]; then - echo - fi - get_data kjv.tsv | awk -v cmd=ref -v ref="$1" "$(get_data kjv.awk)" - shift -done ) | ${PAGER} +get_data kjv.tsv | awk -v cmd=ref -v ref="$*" "$(get_data kjv.awk)" | ${PAGER}