To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Added in 24 Hours
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

From Wikipedia, the free encyclopedia

In computer programming, a usage message or help message is a brief message displayed by a program that utilizes a command-line interface for execution. This message usually consists of the correct command line usage for the program and includes a list of the correct command-line arguments or options acceptable to said program.

Usage messages are utilized as a quick way for a program to inform the user of proper command syntax, and should not be substituted for proper error messages or for detailed documentation such as a man page.

YouTube Encyclopedic

  • 1/2
    Views:
    2 347
    18 268
  • Discord.js Bot Tutorial | Part 6: XP System with MySQL
  • EPISODE #2: MULTIPLE COMMANDS.

Transcription

Pattern

On Unix-like platforms, usage messages usually follow the same common pattern:

  • They often begin with "Usage:" , the command, followed by a list of arguments.
  • To indicate optional arguments, square brackets are commonly used, and can also be used to group parameters that must be specified together.
  • To indicate required arguments, angled brackets are commonly used, following the same grouping conventions as square brackets.
  • Exclusive parameters can be indicated by separating them with vertical bars within groups.

Examples

Here is an example based on the NetBSD source code style guide:

Usage: program [-aDde] [-f | -g] [-n number] [-b b_arg | -c c_arg] req1 req2 [opt1 [opt2]]

This would indicate that "program" should be called with:

  • options without operands: a, D, d, e (any of which may be omitted). Note that in this case some parameters are case-sensitive
  • exclusive options: f, g (denoted by the vertical bar)
  • options with operands: n
  • exclusive options with operands: b, c
  • required arguments: req1, req2
  • optional argument opt1, which may be used with or without opt2 (marked optional within the group by using another set of square brackets)
  • optional argument opt2, which requires opt1

Implementation

To print a usage statement in a shell script, one might write:

case "$arg" in
...
h) printf 'Usage: %s parameter1 parameter2 ...\n' "$(basename "$0")"
   exit 0
   ;;
...
esac

Anti-patterns

A usage statement is not an error message, but is often used as a lazy way to avoid printing a useful error message. A usage statement should only be printed when specifically requested by the user (via --help, or -h, or -?, or some similar flag or argument) and should be written to the standard output;[1][2] if the user has entered an incorrect command line, a properly written command line program will print a succinct error message that describes the exact error made by the user rather than printing the usage statement and requiring the user to figure out what the mistake was. If the user fails to pass the correct number of arguments, for example, a single line stating that an argument is missing is far more useful than several pages of output providing a general usage.

See also

References

  1. ^ "CS 11: How to write usage statements".
  2. ^ "Usage Statements (Common Desktop Environment: Internationalization Programmer's Guide)".
This page was last edited on 5 June 2024, at 16:27
Basis of this page is in Wikipedia. Text is available under the CC BY-SA 3.0 Unported License. Non-text media are available under their specified licenses. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. WIKI 2 is an independent company and has no affiliation with Wikimedia Foundation.