From 596d0a2530fc8b5bedf46eb7d9282766a2046ac2 Mon Sep 17 00:00:00 2001 From: Dominic Ricottone Date: Thu, 29 Sep 2022 12:15:10 -0500 Subject: [PATCH] Help and usage messages Specify that the help option causes the program to exit immediately. Standardize order of options then positional arguments. --- core/debom | 4 ++-- core/enumerate | 2 +- core/mkbak | 2 +- core/rand | 4 ++-- core/rebom | 4 ++-- core/test/debom.bats | 26 +++++++++++++------------- core/test/enumerate.bats | 12 ++++++------ core/test/mkbak.bats | 12 ++++++------ core/test/rebom.bats | 26 +++++++++++++------------- core/test/whichcat.bats | 12 ++++++------ core/test/whiched.bats | 12 ++++++------ core/test/whichhead.bats | 12 ++++++------ core/test/whichvi.bats | 12 ++++++------ core/unittest | 2 +- core/whichcat | 2 +- core/whiched | 2 +- core/whichhead | 2 +- core/whichvi | 2 +- 18 files changed, 75 insertions(+), 75 deletions(-) diff --git a/core/debom b/core/debom index ea2bd39..4619548 100755 --- a/core/debom +++ b/core/debom @@ -4,9 +4,9 @@ name="debom" version="1.1" read -r -d '' help_message <<-EOF Remove BOM from a target file - Usage: debom TARGET [OPTIONS] + Usage: debom [OPTIONS] TARGET Options: - -h, --help print this message + -h, --help print this message and exit -q, --quiet suppress error messages and prompts -v, --verbose show additional messages -V, --version print version number and exit diff --git a/core/enumerate b/core/enumerate index a19b3b3..b43771e 100755 --- a/core/enumerate +++ b/core/enumerate @@ -8,7 +8,7 @@ read -r -d '' help_message <<-EOF Options: -d, --dry-run print, not execute, changes (Default) -f P, --filter P filter targets with filename pattern P - -h, --help print this message + -h, --help print this message and exit -q, --quiet suppress error messages -s N, --start N start enumeration at N (Default: 1) -S N, --step N step enumeration by N (Default: 1) diff --git a/core/mkbak b/core/mkbak index 46c88a1..b0a4f51 100755 --- a/core/mkbak +++ b/core/mkbak @@ -4,7 +4,7 @@ name="mkbak" version="1.0" read -r -d '' help_message <<-EOF Create a backup of a target file - Usage: mkbak TARGET [OPTIONS] + Usage: mkbak [OPTIONS] TARGET Options: -d, --diff diff files before asking to overwrite -f, --force overwrite without asking diff --git a/core/rand b/core/rand index 3d80fcb..e1ddf12 100755 --- a/core/rand +++ b/core/rand @@ -4,9 +4,9 @@ name="rand" version="1.0" read -r -d '' help_message <<-EOF Get a random number within an inclusive range - Usage: rand START END [OPTIONS] + Usage: rand [OPTIONS] START END Options: - -h, --help print this message + -h, --help print this message and exit -n N, --number N print N numbers (Default: 1) -q, --quiet suppress error messages and prompts -v, --verbose show additional messages diff --git a/core/rebom b/core/rebom index 86f2a3c..3c29ec0 100755 --- a/core/rebom +++ b/core/rebom @@ -4,9 +4,9 @@ name="rebom" version="1.1" read -r -d '' help_message <<-EOF Add BOM to a target file - Usage: rebom TARGET [OPTIONS] + Usage: rebom [OPTIONS] TARGET Options: - -h, --help print this message + -h, --help print this message and exit -q, --quiet suppress error messages and prompts -v, --verbose show additional messages -V, --version print version number and exit diff --git a/core/test/debom.bats b/core/test/debom.bats index c6c51ff..5f6d101 100644 --- a/core/test/debom.bats +++ b/core/test/debom.bats @@ -15,7 +15,7 @@ teardown() { run --separate-stderr debom [ "$status" -eq 1 ] [ "$output" = "" ] - [ "$stderr" = "Usage: debom TARGET [OPTIONS]" ] + [ "$stderr" = "Usage: debom [OPTIONS] TARGET" ] } @test "debom version" { @@ -64,9 +64,9 @@ teardown() { run --separate-stderr debom --help [ "$status" -eq 0 ] [ "${lines[0]}" = "Remove BOM from a target file" ] - [ "${lines[1]}" = "Usage: debom TARGET [OPTIONS]" ] + [ "${lines[1]}" = "Usage: debom [OPTIONS] TARGET" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages and prompts" ] [ "${lines[5]}" = " -v, --verbose show additional messages" ] [ "${lines[6]}" = " -V, --version print version number and exit" ] @@ -77,9 +77,9 @@ teardown() { run --separate-stderr debom --help --quiet [ "$status" -eq 0 ] [ "${lines[0]}" = "Remove BOM from a target file" ] - [ "${lines[1]}" = "Usage: debom TARGET [OPTIONS]" ] + [ "${lines[1]}" = "Usage: debom [OPTIONS] TARGET" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages and prompts" ] [ "${lines[5]}" = " -v, --verbose show additional messages" ] [ "${lines[6]}" = " -V, --version print version number and exit" ] @@ -90,9 +90,9 @@ teardown() { run --separate-stderr debom --help -q [ "$status" -eq 0 ] [ "${lines[0]}" = "Remove BOM from a target file" ] - [ "${lines[1]}" = "Usage: debom TARGET [OPTIONS]" ] + [ "${lines[1]}" = "Usage: debom [OPTIONS] TARGET" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages and prompts" ] [ "${lines[5]}" = " -v, --verbose show additional messages" ] [ "${lines[6]}" = " -V, --version print version number and exit" ] @@ -103,9 +103,9 @@ teardown() { run --separate-stderr debom -h [ "$status" -eq 0 ] [ "${lines[0]}" = "Remove BOM from a target file" ] - [ "${lines[1]}" = "Usage: debom TARGET [OPTIONS]" ] + [ "${lines[1]}" = "Usage: debom [OPTIONS] TARGET" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages and prompts" ] [ "${lines[5]}" = " -v, --verbose show additional messages" ] [ "${lines[6]}" = " -V, --version print version number and exit" ] @@ -116,9 +116,9 @@ teardown() { run --separate-stderr debom -h --quiet [ "$status" -eq 0 ] [ "${lines[0]}" = "Remove BOM from a target file" ] - [ "${lines[1]}" = "Usage: debom TARGET [OPTIONS]" ] + [ "${lines[1]}" = "Usage: debom [OPTIONS] TARGET" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages and prompts" ] [ "${lines[5]}" = " -v, --verbose show additional messages" ] [ "${lines[6]}" = " -V, --version print version number and exit" ] @@ -129,9 +129,9 @@ teardown() { run --separate-stderr debom -h -q [ "$status" -eq 0 ] [ "${lines[0]}" = "Remove BOM from a target file" ] - [ "${lines[1]}" = "Usage: debom TARGET [OPTIONS]" ] + [ "${lines[1]}" = "Usage: debom [OPTIONS] TARGET" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages and prompts" ] [ "${lines[5]}" = " -v, --verbose show additional messages" ] [ "${lines[6]}" = " -V, --version print version number and exit" ] diff --git a/core/test/enumerate.bats b/core/test/enumerate.bats index a89fd24..9835d1d 100644 --- a/core/test/enumerate.bats +++ b/core/test/enumerate.bats @@ -154,7 +154,7 @@ teardown() { [ "${lines[2]}" = "Options:" ] [ "${lines[3]}" = " -d, --dry-run print, not execute, changes (Default)" ] [ "${lines[4]}" = " -f P, --filter P filter targets with filename pattern P" ] - [ "${lines[5]}" = " -h, --help print this message" ] + [ "${lines[5]}" = " -h, --help print this message and exit" ] [ "${lines[6]}" = " -q, --quiet suppress error messages" ] [ "${lines[7]}" = " -s N, --start N start enumeration at N (Default: 1)" ] [ "${lines[8]}" = " -S N, --step N step enumeration by N (Default: 1)" ] @@ -173,7 +173,7 @@ teardown() { [ "${lines[2]}" = "Options:" ] [ "${lines[3]}" = " -d, --dry-run print, not execute, changes (Default)" ] [ "${lines[4]}" = " -f P, --filter P filter targets with filename pattern P" ] - [ "${lines[5]}" = " -h, --help print this message" ] + [ "${lines[5]}" = " -h, --help print this message and exit" ] [ "${lines[6]}" = " -q, --quiet suppress error messages" ] [ "${lines[7]}" = " -s N, --start N start enumeration at N (Default: 1)" ] [ "${lines[8]}" = " -S N, --step N step enumeration by N (Default: 1)" ] @@ -192,7 +192,7 @@ teardown() { [ "${lines[2]}" = "Options:" ] [ "${lines[3]}" = " -d, --dry-run print, not execute, changes (Default)" ] [ "${lines[4]}" = " -f P, --filter P filter targets with filename pattern P" ] - [ "${lines[5]}" = " -h, --help print this message" ] + [ "${lines[5]}" = " -h, --help print this message and exit" ] [ "${lines[6]}" = " -q, --quiet suppress error messages" ] [ "${lines[7]}" = " -s N, --start N start enumeration at N (Default: 1)" ] [ "${lines[8]}" = " -S N, --step N step enumeration by N (Default: 1)" ] @@ -211,7 +211,7 @@ teardown() { [ "${lines[2]}" = "Options:" ] [ "${lines[3]}" = " -d, --dry-run print, not execute, changes (Default)" ] [ "${lines[4]}" = " -f P, --filter P filter targets with filename pattern P" ] - [ "${lines[5]}" = " -h, --help print this message" ] + [ "${lines[5]}" = " -h, --help print this message and exit" ] [ "${lines[6]}" = " -q, --quiet suppress error messages" ] [ "${lines[7]}" = " -s N, --start N start enumeration at N (Default: 1)" ] [ "${lines[8]}" = " -S N, --step N step enumeration by N (Default: 1)" ] @@ -230,7 +230,7 @@ teardown() { [ "${lines[2]}" = "Options:" ] [ "${lines[3]}" = " -d, --dry-run print, not execute, changes (Default)" ] [ "${lines[4]}" = " -f P, --filter P filter targets with filename pattern P" ] - [ "${lines[5]}" = " -h, --help print this message" ] + [ "${lines[5]}" = " -h, --help print this message and exit" ] [ "${lines[6]}" = " -q, --quiet suppress error messages" ] [ "${lines[7]}" = " -s N, --start N start enumeration at N (Default: 1)" ] [ "${lines[8]}" = " -S N, --step N step enumeration by N (Default: 1)" ] @@ -249,7 +249,7 @@ teardown() { [ "${lines[2]}" = "Options:" ] [ "${lines[3]}" = " -d, --dry-run print, not execute, changes (Default)" ] [ "${lines[4]}" = " -f P, --filter P filter targets with filename pattern P" ] - [ "${lines[5]}" = " -h, --help print this message" ] + [ "${lines[5]}" = " -h, --help print this message and exit" ] [ "${lines[6]}" = " -q, --quiet suppress error messages" ] [ "${lines[7]}" = " -s N, --start N start enumeration at N (Default: 1)" ] [ "${lines[8]}" = " -S N, --step N step enumeration by N (Default: 1)" ] diff --git a/core/test/mkbak.bats b/core/test/mkbak.bats index 4f109d8..0a322a5 100644 --- a/core/test/mkbak.bats +++ b/core/test/mkbak.bats @@ -47,7 +47,7 @@ bats_require_minimum_version 1.5.0 run --separate-stderr mkbak --help [ "$status" -eq 0 ] [ "${lines[0]}" = "Create a backup of a target file" ] - [ "${lines[1]}" = "Usage: mkbak TARGET [OPTIONS]" ] + [ "${lines[1]}" = "Usage: mkbak [OPTIONS] TARGET" ] [ "${lines[2]}" = "Options:" ] [ "${lines[3]}" = " -d, --diff diff files before asking to overwrite" ] [ "${lines[4]}" = " -f, --force overwrite without asking" ] @@ -63,7 +63,7 @@ bats_require_minimum_version 1.5.0 run --separate-stderr mkbak --help --quiet [ "$status" -eq 0 ] [ "${lines[0]}" = "Create a backup of a target file" ] - [ "${lines[1]}" = "Usage: mkbak TARGET [OPTIONS]" ] + [ "${lines[1]}" = "Usage: mkbak [OPTIONS] TARGET" ] [ "${lines[2]}" = "Options:" ] [ "${lines[3]}" = " -d, --diff diff files before asking to overwrite" ] [ "${lines[4]}" = " -f, --force overwrite without asking" ] @@ -79,7 +79,7 @@ bats_require_minimum_version 1.5.0 run --separate-stderr mkbak --help -q [ "$status" -eq 0 ] [ "${lines[0]}" = "Create a backup of a target file" ] - [ "${lines[1]}" = "Usage: mkbak TARGET [OPTIONS]" ] + [ "${lines[1]}" = "Usage: mkbak [OPTIONS] TARGET" ] [ "${lines[2]}" = "Options:" ] [ "${lines[3]}" = " -d, --diff diff files before asking to overwrite" ] [ "${lines[4]}" = " -f, --force overwrite without asking" ] @@ -95,7 +95,7 @@ bats_require_minimum_version 1.5.0 run --separate-stderr mkbak -h [ "$status" -eq 0 ] [ "${lines[0]}" = "Create a backup of a target file" ] - [ "${lines[1]}" = "Usage: mkbak TARGET [OPTIONS]" ] + [ "${lines[1]}" = "Usage: mkbak [OPTIONS] TARGET" ] [ "${lines[2]}" = "Options:" ] [ "${lines[3]}" = " -d, --diff diff files before asking to overwrite" ] [ "${lines[4]}" = " -f, --force overwrite without asking" ] @@ -111,7 +111,7 @@ bats_require_minimum_version 1.5.0 run --separate-stderr mkbak -h --quiet [ "$status" -eq 0 ] [ "${lines[0]}" = "Create a backup of a target file" ] - [ "${lines[1]}" = "Usage: mkbak TARGET [OPTIONS]" ] + [ "${lines[1]}" = "Usage: mkbak [OPTIONS] TARGET" ] [ "${lines[2]}" = "Options:" ] [ "${lines[3]}" = " -d, --diff diff files before asking to overwrite" ] [ "${lines[4]}" = " -f, --force overwrite without asking" ] @@ -127,7 +127,7 @@ bats_require_minimum_version 1.5.0 run --separate-stderr mkbak -h -q [ "$status" -eq 0 ] [ "${lines[0]}" = "Create a backup of a target file" ] - [ "${lines[1]}" = "Usage: mkbak TARGET [OPTIONS]" ] + [ "${lines[1]}" = "Usage: mkbak [OPTIONS] TARGET" ] [ "${lines[2]}" = "Options:" ] [ "${lines[3]}" = " -d, --diff diff files before asking to overwrite" ] [ "${lines[4]}" = " -f, --force overwrite without asking" ] diff --git a/core/test/rebom.bats b/core/test/rebom.bats index 84261cf..8b0d33f 100644 --- a/core/test/rebom.bats +++ b/core/test/rebom.bats @@ -15,7 +15,7 @@ teardown() { run --separate-stderr rebom [ "$status" -eq 1 ] [ "$output" = "" ] - [ "$stderr" = "Usage: rebom TARGET [OPTIONS]" ] + [ "$stderr" = "Usage: rebom [OPTIONS] TARGET" ] } @test "rebom version" { @@ -64,9 +64,9 @@ teardown() { run --separate-stderr rebom --help [ "$status" -eq 0 ] [ "${lines[0]}" = "Add BOM to a target file" ] - [ "${lines[1]}" = "Usage: rebom TARGET [OPTIONS]" ] + [ "${lines[1]}" = "Usage: rebom [OPTIONS] TARGET" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages and prompts" ] [ "${lines[5]}" = " -v, --verbose show additional messages" ] [ "${lines[6]}" = " -V, --version print version number and exit" ] @@ -77,9 +77,9 @@ teardown() { run --separate-stderr rebom --help --quiet [ "$status" -eq 0 ] [ "${lines[0]}" = "Add BOM to a target file" ] - [ "${lines[1]}" = "Usage: rebom TARGET [OPTIONS]" ] + [ "${lines[1]}" = "Usage: rebom [OPTIONS] TARGET" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages and prompts" ] [ "${lines[5]}" = " -v, --verbose show additional messages" ] [ "${lines[6]}" = " -V, --version print version number and exit" ] @@ -90,9 +90,9 @@ teardown() { run --separate-stderr rebom --help -q [ "$status" -eq 0 ] [ "${lines[0]}" = "Add BOM to a target file" ] - [ "${lines[1]}" = "Usage: rebom TARGET [OPTIONS]" ] + [ "${lines[1]}" = "Usage: rebom [OPTIONS] TARGET" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages and prompts" ] [ "${lines[5]}" = " -v, --verbose show additional messages" ] [ "${lines[6]}" = " -V, --version print version number and exit" ] @@ -103,9 +103,9 @@ teardown() { run --separate-stderr rebom -h [ "$status" -eq 0 ] [ "${lines[0]}" = "Add BOM to a target file" ] - [ "${lines[1]}" = "Usage: rebom TARGET [OPTIONS]" ] + [ "${lines[1]}" = "Usage: rebom [OPTIONS] TARGET" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages and prompts" ] [ "${lines[5]}" = " -v, --verbose show additional messages" ] [ "${lines[6]}" = " -V, --version print version number and exit" ] @@ -116,9 +116,9 @@ teardown() { run --separate-stderr rebom -h --quiet [ "$status" -eq 0 ] [ "${lines[0]}" = "Add BOM to a target file" ] - [ "${lines[1]}" = "Usage: rebom TARGET [OPTIONS]" ] + [ "${lines[1]}" = "Usage: rebom [OPTIONS] TARGET" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages and prompts" ] [ "${lines[5]}" = " -v, --verbose show additional messages" ] [ "${lines[6]}" = " -V, --version print version number and exit" ] @@ -129,9 +129,9 @@ teardown() { run --separate-stderr rebom -h -q [ "$status" -eq 0 ] [ "${lines[0]}" = "Add BOM to a target file" ] - [ "${lines[1]}" = "Usage: rebom TARGET [OPTIONS]" ] + [ "${lines[1]}" = "Usage: rebom [OPTIONS] TARGET" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages and prompts" ] [ "${lines[5]}" = " -v, --verbose show additional messages" ] [ "${lines[6]}" = " -V, --version print version number and exit" ] diff --git a/core/test/whichcat.bats b/core/test/whichcat.bats index f5e47d5..db2a347 100644 --- a/core/test/whichcat.bats +++ b/core/test/whichcat.bats @@ -70,7 +70,7 @@ bats_require_minimum_version 1.5.0 [ "${lines[0]}" = "Print all lines from a program to the terminal" ] [ "${lines[1]}" = "Usage: whichcat [OPTIONS] [PROGRAM ..]" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages" ] [ "${lines[5]}" = " -v, --version print version number and exit" ] [ "$stderr" = "" ] @@ -82,7 +82,7 @@ bats_require_minimum_version 1.5.0 [ "${lines[0]}" = "Print all lines from a program to the terminal" ] [ "${lines[1]}" = "Usage: whichcat [OPTIONS] [PROGRAM ..]" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages" ] [ "${lines[5]}" = " -v, --version print version number and exit" ] [ "$stderr" = "" ] @@ -94,7 +94,7 @@ bats_require_minimum_version 1.5.0 [ "${lines[0]}" = "Print all lines from a program to the terminal" ] [ "${lines[1]}" = "Usage: whichcat [OPTIONS] [PROGRAM ..]" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages" ] [ "${lines[5]}" = " -v, --version print version number and exit" ] [ "$stderr" = "" ] @@ -106,7 +106,7 @@ bats_require_minimum_version 1.5.0 [ "${lines[0]}" = "Print all lines from a program to the terminal" ] [ "${lines[1]}" = "Usage: whichcat [OPTIONS] [PROGRAM ..]" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages" ] [ "${lines[5]}" = " -v, --version print version number and exit" ] [ "$stderr" = "" ] @@ -118,7 +118,7 @@ bats_require_minimum_version 1.5.0 [ "${lines[0]}" = "Print all lines from a program to the terminal" ] [ "${lines[1]}" = "Usage: whichcat [OPTIONS] [PROGRAM ..]" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages" ] [ "${lines[5]}" = " -v, --version print version number and exit" ] [ "$stderr" = "" ] @@ -130,7 +130,7 @@ bats_require_minimum_version 1.5.0 [ "${lines[0]}" = "Print all lines from a program to the terminal" ] [ "${lines[1]}" = "Usage: whichcat [OPTIONS] [PROGRAM ..]" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages" ] [ "${lines[5]}" = " -v, --version print version number and exit" ] [ "$stderr" = "" ] diff --git a/core/test/whiched.bats b/core/test/whiched.bats index 2e77020..9f873f0 100644 --- a/core/test/whiched.bats +++ b/core/test/whiched.bats @@ -70,7 +70,7 @@ bats_require_minimum_version 1.5.0 [ "${lines[0]}" = "Open a program with your editor" ] [ "${lines[1]}" = "Usage: whiched [OPTIONS] PROGRAM" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages" ] [ "${lines[5]}" = " -v, --version print version number and exit" ] [ "$stderr" = "" ] @@ -82,7 +82,7 @@ bats_require_minimum_version 1.5.0 [ "${lines[0]}" = "Open a program with your editor" ] [ "${lines[1]}" = "Usage: whiched [OPTIONS] PROGRAM" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages" ] [ "${lines[5]}" = " -v, --version print version number and exit" ] [ "$stderr" = "" ] @@ -94,7 +94,7 @@ bats_require_minimum_version 1.5.0 [ "${lines[0]}" = "Open a program with your editor" ] [ "${lines[1]}" = "Usage: whiched [OPTIONS] PROGRAM" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages" ] [ "${lines[5]}" = " -v, --version print version number and exit" ] [ "$stderr" = "" ] @@ -106,7 +106,7 @@ bats_require_minimum_version 1.5.0 [ "${lines[0]}" = "Open a program with your editor" ] [ "${lines[1]}" = "Usage: whiched [OPTIONS] PROGRAM" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages" ] [ "${lines[5]}" = " -v, --version print version number and exit" ] [ "$stderr" = "" ] @@ -118,7 +118,7 @@ bats_require_minimum_version 1.5.0 [ "${lines[0]}" = "Open a program with your editor" ] [ "${lines[1]}" = "Usage: whiched [OPTIONS] PROGRAM" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages" ] [ "${lines[5]}" = " -v, --version print version number and exit" ] [ "$stderr" = "" ] @@ -130,7 +130,7 @@ bats_require_minimum_version 1.5.0 [ "${lines[0]}" = "Open a program with your editor" ] [ "${lines[1]}" = "Usage: whiched [OPTIONS] PROGRAM" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages" ] [ "${lines[5]}" = " -v, --version print version number and exit" ] [ "$stderr" = "" ] diff --git a/core/test/whichhead.bats b/core/test/whichhead.bats index dba54d0..f5ff840 100644 --- a/core/test/whichhead.bats +++ b/core/test/whichhead.bats @@ -70,7 +70,7 @@ bats_require_minimum_version 1.5.0 [ "${lines[0]}" = "Print the first 10 lines from a program" ] [ "${lines[1]}" = "Usage: whichhead [OPTIONS] [PROGRAM ..]" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -n N, --number N print the first N lines (Default: 10)" ] [ "${lines[5]}" = " -q, --quiet suppress error messages" ] [ "${lines[6]}" = " -v, --verbose show additional messages" ] @@ -84,7 +84,7 @@ bats_require_minimum_version 1.5.0 [ "${lines[0]}" = "Print the first 10 lines from a program" ] [ "${lines[1]}" = "Usage: whichhead [OPTIONS] [PROGRAM ..]" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -n N, --number N print the first N lines (Default: 10)" ] [ "${lines[5]}" = " -q, --quiet suppress error messages" ] [ "${lines[6]}" = " -v, --verbose show additional messages" ] @@ -98,7 +98,7 @@ bats_require_minimum_version 1.5.0 [ "${lines[0]}" = "Print the first 10 lines from a program" ] [ "${lines[1]}" = "Usage: whichhead [OPTIONS] [PROGRAM ..]" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -n N, --number N print the first N lines (Default: 10)" ] [ "${lines[5]}" = " -q, --quiet suppress error messages" ] [ "${lines[6]}" = " -v, --verbose show additional messages" ] @@ -112,7 +112,7 @@ bats_require_minimum_version 1.5.0 [ "${lines[0]}" = "Print the first 10 lines from a program" ] [ "${lines[1]}" = "Usage: whichhead [OPTIONS] [PROGRAM ..]" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -n N, --number N print the first N lines (Default: 10)" ] [ "${lines[5]}" = " -q, --quiet suppress error messages" ] [ "${lines[6]}" = " -v, --verbose show additional messages" ] @@ -126,7 +126,7 @@ bats_require_minimum_version 1.5.0 [ "${lines[0]}" = "Print the first 10 lines from a program" ] [ "${lines[1]}" = "Usage: whichhead [OPTIONS] [PROGRAM ..]" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -n N, --number N print the first N lines (Default: 10)" ] [ "${lines[5]}" = " -q, --quiet suppress error messages" ] [ "${lines[6]}" = " -v, --verbose show additional messages" ] @@ -140,7 +140,7 @@ bats_require_minimum_version 1.5.0 [ "${lines[0]}" = "Print the first 10 lines from a program" ] [ "${lines[1]}" = "Usage: whichhead [OPTIONS] [PROGRAM ..]" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -n N, --number N print the first N lines (Default: 10)" ] [ "${lines[5]}" = " -q, --quiet suppress error messages" ] [ "${lines[6]}" = " -v, --verbose show additional messages" ] diff --git a/core/test/whichvi.bats b/core/test/whichvi.bats index 9447cd7..8a91495 100644 --- a/core/test/whichvi.bats +++ b/core/test/whichvi.bats @@ -70,7 +70,7 @@ bats_require_minimum_version 1.5.0 [ "${lines[0]}" = "Open a program with your visual editor" ] [ "${lines[1]}" = "Usage: whichvi [OPTIONS] PROGRAM" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages" ] [ "${lines[5]}" = " -v, --version print version number and exit" ] [ "$stderr" = "" ] @@ -82,7 +82,7 @@ bats_require_minimum_version 1.5.0 [ "${lines[0]}" = "Open a program with your visual editor" ] [ "${lines[1]}" = "Usage: whichvi [OPTIONS] PROGRAM" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages" ] [ "${lines[5]}" = " -v, --version print version number and exit" ] [ "$stderr" = "" ] @@ -94,7 +94,7 @@ bats_require_minimum_version 1.5.0 [ "${lines[0]}" = "Open a program with your visual editor" ] [ "${lines[1]}" = "Usage: whichvi [OPTIONS] PROGRAM" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages" ] [ "${lines[5]}" = " -v, --version print version number and exit" ] [ "$stderr" = "" ] @@ -106,7 +106,7 @@ bats_require_minimum_version 1.5.0 [ "${lines[0]}" = "Open a program with your visual editor" ] [ "${lines[1]}" = "Usage: whichvi [OPTIONS] PROGRAM" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages" ] [ "${lines[5]}" = " -v, --version print version number and exit" ] [ "$stderr" = "" ] @@ -118,7 +118,7 @@ bats_require_minimum_version 1.5.0 [ "${lines[0]}" = "Open a program with your visual editor" ] [ "${lines[1]}" = "Usage: whichvi [OPTIONS] PROGRAM" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages" ] [ "${lines[5]}" = " -v, --version print version number and exit" ] [ "$stderr" = "" ] @@ -130,7 +130,7 @@ bats_require_minimum_version 1.5.0 [ "${lines[0]}" = "Open a program with your visual editor" ] [ "${lines[1]}" = "Usage: whichvi [OPTIONS] PROGRAM" ] [ "${lines[2]}" = "Options:" ] - [ "${lines[3]}" = " -h, --help print this message" ] + [ "${lines[3]}" = " -h, --help print this message and exit" ] [ "${lines[4]}" = " -q, --quiet suppress error messages" ] [ "${lines[5]}" = " -v, --version print version number and exit" ] [ "$stderr" = "" ] diff --git a/core/unittest b/core/unittest index 72c607c..2b64872 100755 --- a/core/unittest +++ b/core/unittest @@ -4,7 +4,7 @@ name="unittest" version="1.1" help_message=$(/usr/bin/cat <<-EOF Wrapper around Python's 'unittest' module - Usage: unittest TARGET [OPTIONS] + Usage: unittest [OPTIONS] TARGET Options: -c, --color print with color -h, --help print this message and exit diff --git a/core/whichcat b/core/whichcat index cf2c685..5e4b017 100755 --- a/core/whichcat +++ b/core/whichcat @@ -6,7 +6,7 @@ help_message=$(/usr/bin/cat <<-EOF Print all lines from a program to the terminal Usage: whichcat [OPTIONS] [PROGRAM ..] Options: - -h, --help print this message + -h, --help print this message and exit -q, --quiet suppress error messages -v, --version print version number and exit EOF diff --git a/core/whiched b/core/whiched index bd05095..c9c25f0 100755 --- a/core/whiched +++ b/core/whiched @@ -6,7 +6,7 @@ help_message=$(/usr/bin/cat <<-EOF Open a program with your editor Usage: whiched [OPTIONS] PROGRAM Options: - -h, --help print this message + -h, --help print this message and exit -q, --quiet suppress error messages -v, --version print version number and exit EOF diff --git a/core/whichhead b/core/whichhead index 7f2d69e..2dd1db1 100755 --- a/core/whichhead +++ b/core/whichhead @@ -6,7 +6,7 @@ read -r -d '' help_message <<-EOF Print the first 10 lines from a program Usage: whichhead [OPTIONS] [PROGRAM ..] Options: - -h, --help print this message + -h, --help print this message and exit -n N, --number N print the first N lines (Default: 10) -q, --quiet suppress error messages -v, --verbose show additional messages diff --git a/core/whichvi b/core/whichvi index 263799b..72e1e7c 100755 --- a/core/whichvi +++ b/core/whichvi @@ -6,7 +6,7 @@ help_message=$(/usr/bin/cat <<-EOF Open a program with your visual editor Usage: whichvi [OPTIONS] PROGRAM Options: - -h, --help print this message + -h, --help print this message and exit -q, --quiet suppress error messages -v, --version print version number and exit EOF -- 2.45.2