Skip to content

Commit

Permalink
only support one reference in the arguments
Browse files Browse the repository at this point in the history
This allows multi-word references to be passed easier to the program
  • Loading branch information
Tim Cooper committed Dec 22, 2018
1 parent b1688d6 commit eb41fef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
13 changes: 3 additions & 10 deletions kjv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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>"
Expand Down Expand Up @@ -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}

0 comments on commit eb41fef

Please sign in to comment.