kjv

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

commit b1688d662a7c11afe566db5f3b53e6388b3f6502
parent 8bd831790f7bd2e4ca16532d36e65e2d80609d3a
Author: Tim Cooper <tim.cooper@layeh.com>
Date:   Tue, 18 Sep 2018 19:05:06 -0500

add interactive mode

Diffstat:
Mkjv.sh | 14+++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/kjv.sh b/kjv.sh @@ -72,7 +72,19 @@ while [ $# -gt 0 ]; do done if [ $# -eq 0 ]; then - show_help + if [ ! -t 0 ]; then + show_help + fi + + # Interactive mode + while true; do + printf "kjv> " + if ! read -r ref; then + break + fi + get_data kjv.tsv | awk -v cmd=ref -v ref="$ref" "$(get_data kjv.awk)" | ${PAGER} + done + exit 0 fi startIdx=$#