Skip to content

Instantly share code, notes, and snippets.

@b3yc0d3
Created October 15, 2023 14:29
Show Gist options
  • Select an option

  • Save b3yc0d3/ca7d24e27ef3ed1cfefa36332e76e182 to your computer and use it in GitHub Desktop.

Select an option

Save b3yc0d3/ca7d24e27ef3ed1cfefa36332e76e182 to your computer and use it in GitHub Desktop.
Simple groff template for manual pages
.\" A bit more modern example for a manpage
.\" Created by b3yc0d3 <b3c0d3@gmail.com>
.\"
.\" This document follows GNUs Troff
.\" You can view this document a rendered man-page by running
.\" man path/to/this/file.troff
.TH Untitled 1 2023-10-15 Linux
.\" └── 1 ───┘ └── 2 ───┘ └ 3 ┘
.\"
.\" 1) Program name and manual section number
.\" 2) Date
.\" 3) Operating System
.SH NAME \" Section Header - required - don't modify
Untitled – Yet another name for the same program
.SH SYNOPSIS \" Section Header - required - don't modify
\fBUntitled\fP [-\fBabcd\fP] [-\fBa\fP \fIpath\fP] [\fIfile\fP] [\fIfile\fP \fI...\fP] \fIarg0\fP arg1 ...
.\" The above line will output the following:
.\" Untitled [-abcd] [-a path] [file] [file ...] arg0 arg2 ...
.\"
.\" You can make text italic, bold, underlined with the following prefixes
.\"
.\" \fB - Bold
.\" \fI - Italic
.\" \fU - Underlined
.\"
.\" To reset the format, suffix the word(s) with \fP
.SH DESCRIPTION \" Section Header - required - don't modify
The \fBUntitled\fP utility is used to do some stuff in the command line.
.PP
A list of items with descriptions:
.IP item a
Description of item a
.IP item b
Description of item b
.PP
A list of items with descriptions:
.TP
\fB-a\fP
Description of -a flag
.TP
\fB-b\fP
Description of -a flag
.SH FILES \" Section Header - required - don't modify
.IP /usr/share/file_name
FILE_1 description
.IP /Users/joeuser/Library/really_long_file_name
FILE_2 description
.SH SEE ALSO \" Section Header - required - don't modify
\fIa\fP(1), \fIb\fP(1), \fIc\fP(1), \fIa\fP(2), \fIb\fP(2), \fIa\fP(3), \fIb\fP(3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment