From cf536c9ca3fe24770acc9bc39c680236c3dc5f1f Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Fri, 19 Jun 2020 12:51:36 +0200 Subject: [PATCH] make help browseable if w3mmor lynx exists --- bashbot.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bashbot.sh b/bashbot.sh index 36f34e2..d020135 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -11,7 +11,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # -#### $$VERSION$$ v0.98-dev-49-g5dcc7ef +#### $$VERSION$$ v0.98-dev-50-gfa5be1e # # Exit Codes: # - 0 sucess (hopefully) @@ -1092,7 +1092,13 @@ if [ "${SOURCE}" != "yes" ]; then job_control "$1" ;; "help") - less "README.txt" + HELP="README" + if [ -n "${CLEAR}" ];then + _exists w3m && w3m "$HELP.html" && exit + _exists lynx && lynx "$HELP.html" && exit + _exists less && less "$HELP.txt" && exit + fi + cat "$HELP.txt" exit ;; *)