HELP2MAN(1)
๐ 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 like1,6,8)-m,--manual=TEXTโ name of the manual (thinkUser 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 fromFILE-I,--opt-include=FILEโ pull in material fromFILE, but only if it exists, no drama if it doesn't-o,--output=FILEโ send the output toFILE-p,--info-page=TEXTโ name of the Texinfo manual-N,--no-infoโ suppress the pointer to the Texinfo manual entirely-l,--libtoolโ exclude thelt-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 ๐
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 ๐โจ๐
๐ฆ where this page comes from
- alpine 3.22: help2man-doc 1.49.3-r1 ยท GPL-3.0-or-later
- alpine 3.23: help2man-doc 1.49.3-r1 ยท GPL-3.0-or-later
- alpine 3.24: help2man-doc 1.49.3-r2 ยท GPL-3.0-or-later
- arch rolling: help2man 1.49.3-2 ยท GPL
- centos-stream 10: help2man 1.49.3-7.el10 ยท GPL-3.0-or-later
- debian bookworm: help2man 1.49.3 ยท GPL-3.0-or-later
- debian trixie: help2man 1.49.3 ยท GPL-3.0-or-later
- fedora 43: help2man 1.49.3-8.fc43 ยท GPL-3.0-or-later
- fedora 44: help2man 1.49.3-9.fc44 ยท GPL-3.0-or-later
- nixos 26.05: help2man 1.49.3
- nixpkgs unstable: help2man 1.49.3
- opensuse-leap 16.0: help2man 1.49.3-160000.3.2 ยท GPL-3.0-or-later
- opensuse-leap 16.0: help2man 1.49.3-160000.3.2 ยท GPL-3.0-or-later
- opensuse-leap 16.0: help2man 1.49.3-160000.3.2 ยท GPL-3.0-or-later
- opensuse-leap 16.0: help2man 1.49.3-160000.3.2 ยท GPL-3.0-or-later
- ubuntu noble: help2man 1.49.3 ยท GPL-3.0-or-later
- ubuntu resolute: help2man 1.49.3 ยท GPL-3.0-or-later
- ubuntu stonking: help2man 1.49.3maysync1 ยท GPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms