~dricottone/my-utils

119d6dbf87dbf7c8f68ce43da04b0b4b617c31e3 — Dominic Ricottone 2 years ago 6bd5c74
Helptext updates

The more honest description of these programs is [OPTIONS] before
PROGRAM. Options like quiet and verbose do behave differently if they
follow.
4 files changed, 6 insertions(+), 6 deletions(-)

M core/whichcat
M core/whiched
M core/whichhead
M core/whichvi
M core/whichcat => core/whichcat +1 -1
@@ 4,7 4,7 @@ name="whichcat"
version="1.1"
help_message=$(/usr/bin/cat <<-EOF
	Print all lines from a program to the terminal
	Usage: whichcat [PROGRAM ..] [OPTIONS]
	Usage: whichcat [OPTIONS] [PROGRAM ..]
	Options:
	 -h, --help     print this message
	 -q, --quiet    suppress error messages

M core/whiched => core/whiched +2 -2
@@ 4,7 4,7 @@ name="whiched"
version="1.2"
help_message=$(/usr/bin/cat <<-EOF
	Open a program with your editor
	Usage: whiched PROGRAM [OPTIONS]
	Usage: whiched [OPTIONS] PROGRAM
	Options:
	 -h, --help     print this message
	 -q, --quiet    suppress error messages


@@ 48,7 48,7 @@ done

# if have not exited, no program was specified
if [ "$quiet" -eq 0 ]; then
  (>&2 /usr/bin/printf "Usage: whiched PROGRAM [OPTIONS]\n")
  (>&2 /usr/bin/printf "Usage: whiched [OPTIONS] PROGRAM\n")
  exit 1
fi


M core/whichhead => core/whichhead +1 -1
@@ 4,7 4,7 @@ name="whichhead"
version="1.1"
read -r -d '' help_message <<-EOF
	Print the first 10 lines from a program
	Usage: whichhead [PROGRAM ..] [OPTIONS]
	Usage: whichhead [OPTIONS] [PROGRAM ..]
	Options:
	 -h, --help        print this message
	 -n N, --number N  print the first N lines (Default: 10)

M core/whichvi => core/whichvi +2 -2
@@ 4,7 4,7 @@ name="whichvi"
version="1.2"
help_message=$(/usr/bin/cat <<-EOF
	Open a program with your visual editor
	Usage: whichvi PROGRAM [OPTIONS]
	Usage: whichvi [OPTIONS] PROGRAM
	Options:
	 -h, --help     print this message
	 -q, --quiet    suppress error messages


@@ 47,7 47,7 @@ for arg; do
done

if [ "$quiet" -eq 0 ]; then
  (>&2 /usr/bin/printf "Usage: whichvi PROGRAM [OPTIONS]\n")
  (>&2 /usr/bin/printf "Usage: whichvi [OPTIONS] PROGRAM\n")
  exit 1
fi