Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7662537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:49:38+00:00 2026-05-31T13:49:38+00:00

If not, is there a de facto standard? Basically I’m writing a command line

  • 0

If not, is there a de facto standard? Basically I’m writing a command line help text like so:

usage: app_name [options] required_input required_input2
  options:
    -a, --argument     Does something
    -b required     Does something with "required"
    -c, --command required     Something else
    -d [optlistitem1 optlistitem 2 ... ]     Something with list

I made that from basically just reading the help text of various tools, but is there a list of guidelines or something? For example, do I use square brackets or parentheses? How to use spacing? What if the argument is a list?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T13:49:39+00:00Added an answer on May 31, 2026 at 1:49 pm

    Typically, your help output should include:

    • Description of what the app does
    • Usage syntax, which:
      • Uses [options] to indicate where the options go
      • arg_name for a required, singular arg
      • [arg_name] for an optional, singular arg
      • arg_name... for a required arg of which there can be many (this is rare)
      • [arg_name...] for an arg for which any number can be supplied
      • note that arg_name should be a descriptive, short name, in lower, snake case
    • A nicely-formatted list of options, each:
      • having a short description
      • showing the default value, if there is one
      • showing the possible values, if that applies
      • Note that if an option can accept a short form (e.g. -l) or a long form (e.g. --list), include them together on the same line, as their descriptions will be the same
    • Brief indicator of the location of config files or environment variables that might be the source of command line arguments, e.g. GREP_OPTS
    • If there is a man page, indicate as such, otherwise, a brief indicator of where more detailed help can be found

    Note further that it’s good form to accept both -h and --help to trigger this message and that you should show this message if the user messes up the command-line syntax, e.g. omits a required argument.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a Java equivalent to .NET's App.Config? If not is there a standard
Is there a de-facto standard library for creating ASCII tables in PHP? I want
Is there a standard way of reading a kind of configuration like INI files
There are (de facto) standard web server interfaces for programming languages e.g. WSGI for
If I'm not mistaken, NUnit is the de-facto standard for unit testing, but I've
I was curious as to whether or not there exists a jQuery-style interface/library for
I have read that viewstate is not there in asp.net MVC application. I am
Exact duplicate of Function name for creating something if it's not there yet I
I am retrieving lists of crc32 hashes that contain names of files, not there
hi im trying to using flashVars however for some reason there not getting sent

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.