HELP2MAN(1)

๐Ÿ“ฆ
version 1.49.3maysync1 ยท 5 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu resolute, ubuntu stonking

๐Ÿ’– HELP2MAN ๐Ÿ’–

okay bestie, so this is help2man from the User Commands manual, section 1, and it's genuinely one of the most underrated little tools out there. let me tell you everything ๐Ÿซถ


โœจ NAME โœจ

help2man โ€” generate a simple manual page. that's it. that's the whole job. slay ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

help2man [OPTION]... EXECUTABLE

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

okay so the whole vibe here? help2man generates a man page out of --help and --version output. that's the entire trick. it's giving automation icon โœจ

  • -n, --name=STRING โ€” the description that goes in the NAME paragraph, iykyk
  • -s, --section=SECTION โ€” section number for the manual page (so like 1, 6, 8)
  • -m, --manual=TEXT โ€” name of the manual (think User Commands, ...)
  • -S, --source=TEXT โ€” source of the program (FSF, Debian, ...)
  • -L, --locale=STRING โ€” pick your locale (default is "C")
  • -i, --include=FILE โ€” pull in material from FILE
  • -I, --opt-include=FILE โ€” pull in material from FILE, but only if it exists, no drama if it doesn't
  • -o, --output=FILE โ€” send the output to FILE
  • -p, --info-page=TEXT โ€” name of the Texinfo manual
  • -N, --no-info โ€” suppress the pointer to the Texinfo manual entirely
  • -l, --libtool โ€” exclude the lt- from the program name
  • --help โ€” print this help, then exit
  • --version โ€” print version number, then exit

fr fr, your EXECUTABLE should accept --help and --version options and produce output on stdout โ€” although alternatives may be specified using:

  • -h, --help-option=STRING โ€” the help option string, for when your program is โœจdifferentโœจ
  • -v, --version-option=STRING โ€” the version option string
  • --version-string=STRING โ€” version string
  • --no-discard-stderr โ€” include stderr when parsing option output

๐ŸŽ€ INCLUDE FILES ๐ŸŽ€

so you can add extra material into the generated output with the --include and --opt-include options. and the format is genuinely simple, look:

[section]
text

/pattern/
text

blocks of verbatim *roff text get inserted into the output either at the start of the given [section] (case insensitive, bestie), or after a paragraph matching /pattern/.

patterns use the Perl regular expression syntax and may be followed by the i, s or m modifiers (see perlre(1)) ๐Ÿ‘‘

lines before the first section or pattern which begin with - are processed as options. anything else is silently ignored and may be used for comments, RCS keywords and the like. no cap, it just vibes past them

the section output order (for those included) is:

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
other
ENVIRONMENT
FILES
EXAMPLES
AUTHOR
REPORTING BUGS
COPYRIGHT
SEE ALSO

any [NAME] or [SYNOPSIS] sections appearing in the include file will replace what would have automatically been produced (although you can still override the former with --name if required โ€” iconic behaviour honestly).

other sections are prepended to the automatically produced output for the standard sections given above, or included at other (above) in the order they were encountered in the include file.

placement of the text within the section may be explicitly requested by using the syntax [<section], [=section] or [>section] to place the additional text before, in place of, or after the default output respectively. ๐Ÿ’…


๐ŸŒˆ AVAILABILITY ๐ŸŒˆ

the latest version of this distribution is available on-line from:

ftp://ftp.gnu.org/gnu/help2man/

๐Ÿ’œ AUTHOR ๐Ÿ’œ

written by Brendan O'Dea <bod@debian.org> โ€” absolute legend ๐Ÿซถ


๐Ÿ“ REPORTING BUGS ๐Ÿ“

report bugs to <bug-help2man@gnu.org>. be nice about it, bestie ๐Ÿ˜ญ


Copyright ยฉ 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2020, 2021, 2022 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

bestie, note the capital-N capital-O NO โ€” that's not a vibe, that's a legally load-bearing word. no warranty fr fr ๐Ÿ’€

โญ SEE ALSO โญ

the full documentation for help2man is maintained as a Texinfo manual. if the info and help2man programs are properly installed at your site, the command

info help2man

should give you access to the complete manual. go read it, it's lowkey worth it ๐ŸŒธ


and that's the whole page, bestie! this was GNU help2man 1.49.3, dated December 2022 โ€” catch you in the group chat, mwah ๐Ÿ’–โœจ๐ŸŽ€