Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

man pages: missing synopsis section #155

Open
mr-c opened this issue Oct 20, 2022 · 3 comments
Open

man pages: missing synopsis section #155

mr-c opened this issue Oct 20, 2022 · 3 comments

Comments

@mr-c
Copy link

mr-c commented Oct 20, 2022

Here we have the actual command and a brief listing of all options and positional parameters.

For subcommands there will be the space, unlike the manual page NAME section as shown in #154

example from git grep

GIT-GREP(1)                                                                    Git Manual                                                                    GIT-GREP(1)

NAME
       git-grep - Print lines matching a pattern

SYNOPSIS
       git grep [-a | --text] [-I] [--textconv] [-i | --ignore-case] [-w | --word-regexp]
                  [-v | --invert-match] [-h|-H] [--full-name]
                  [-E | --extended-regexp] [-G | --basic-regexp]
                  [-P | --perl-regexp]
                  [-F | --fixed-strings] [-n | --line-number] [--column]
                  [-l | --files-with-matches] [-L | --files-without-match]
                  [(-O | --open-files-in-pager) [<pager>]]
                  [-z | --null]
                  [ -o | --only-matching ] [-c | --count] [--all-match] [-q | --quiet]
                  [--max-depth <depth>] [--[no-]recursive]
                  [--color[=<when>] | --no-color]
                  [--break] [--heading] [-p | --show-function]
                  [-A <post-context>] [-B <pre-context>] [-C <context>]
                  [-W | --function-context]
                  [--threads <num>]
                  [-f <file>] [-e] <pattern>
                  [--and|--or|--not|(|)|-e <pattern>...]
                  [--recurse-submodules] [--parent-basename <basename>]
                  [ [--[no-]exclude-standard] [--cached | --no-index | --untracked] | <tree>...]
                  [--] [<pathspec>...]
@eseiler
Copy link
Member

eseiler commented Oct 24, 2022

Core Meeting 24/10/2022

  • Currently, the synopsis has to be provided by the app developer.
  • Check whether this can be autogenerated.

@smehringer
Copy link
Member

smehringer commented Oct 24, 2022

A simple automated synopsis could be:

no positional options

app-name [options]

with two positional options, a path and a number

app-name [options] [--] <PATH> <NUMBER>

@eseiler
Copy link
Member

eseiler commented Mar 20, 2023

Maybe I'll work on a simple version. I noticed that it is very easy to forget updating the synopsis when you change something in the argument parsing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants