SHTK_CLI_USAGE_ERROR(3)

πŸ“¦ version 1.7, in nixos 26.05, nixpkgs unstable

Okay bestie, welcome to the SHTK_CLI_USAGE_ERROR(3) page from the Library Functions Manual. The star is shtk_cli_usage_error, and yes it’s iconic. ✨

🌸 NAME 🌸

shtk_cli_usage_error β€” prints a usage error and exits. That’s literally it, and it’s lowkey a lifesaver. πŸ’…

πŸ“š LIBRARY πŸ“š

shtk_import cli

✨ SYNOPSIS ✨

shtk_cli_usage_error message1 [.. messageN]

πŸ’– DESCRIPTION πŸ’–

The shtk_cli_usage_error function prints the given usage error message to stderr and terminates execution of the script with a return value of 1. The message can be provided as one or more arguments as depicted by message1 to messageN; all arguments are concatenated together into a single line. no cap. 🫢

The printed message has the following form, where β€˜progname’ is determined by shtk_cli_progname(3):

progname: E: message1 .. messageN
Type 'man progname' for help.

shtk_cli_usage_error should be used to inform the user of problems directly caused by his invocation of the script (e.g. the use of an invalid flag). Note that the printed error message refers to a manual page for the script, so you should make sure to provide one.

Bestie, that printed message points users to a manual page for the script β€” make sure one actually exists. πŸŽ€

πŸ‘€ SEE ALSO πŸ‘€

🧚 HISTORY 🧚

shtk_cli_usage_error first appeared in shtk 1.0.


k byeee πŸ’– β€” this page is from Debian, dated November 5, 2014, and it’s the SHTK_CLI_USAGE_ERROR(3) page. slay βœ¨πŸ’…

πŸ“¦ where this page comes from