aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2020-10-03 17:08:57 +0200
committerTeddy Wing2020-10-03 17:08:57 +0200
commitfc94501bd6aa696de449321aa41770bc96a4bb34 (patch)
tree18cc96b0112124fe82b28a8d2fe808250d2b59c4
parentbea8ea75c62c2f7c6959f12e1af652aa324827a9 (diff)
downloadgit-todo-fc94501bd6aa696de449321aa41770bc96a4bb34.tar.bz2
Add man page
Copied some of the structure and the Makefile recipe from 'git-suggestion'.
-rw-r--r--Makefile9
-rw-r--r--doc/git-todo.163
-rw-r--r--doc/git-todo.1.txt31
3 files changed, 103 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 6b935bf..d8b19c7 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,15 @@ DEPENDENCIES := Cargo.toml
DEBUG_PRODUCT := target/debug/git-todo
+.PHONY: doc
+doc: doc/git-todo.1
+
+doc/git-todo.1: doc/git-todo.1.txt
+ sed 's/`/*/g' $< > $@.transformed
+ a2x --no-xmllint --format manpage $@.transformed
+ rm $@.transformed
+
+
.PHONY: test
test: $(DEBUG_PRODUCT)
prove -v -I./t
diff --git a/doc/git-todo.1 b/doc/git-todo.1
new file mode 100644
index 0000000..3bff60b
--- /dev/null
+++ b/doc/git-todo.1
@@ -0,0 +1,63 @@
+'\" t
+.\" Title: git-todo
+.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
+.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
+.\" Date: 10/03/2020
+.\" Manual: \ \&
+.\" Source: \ \&
+.\" Language: English
+.\"
+.TH "GIT\-TODO" "1" "10/03/2020" "\ \&" "\ \&"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+git-todo \- Output recent TODO lines
+.SH "SYNOPSIS"
+.sp
+\fIgit todo\fR [options] [<ref>]
+.SH "DESCRIPTION"
+.sp
+Find TODO lines and output them in a grep\-style format including the name of the file containing them and their line number\&.
+.sp
+By default, outputs all TODO lines since \fBmaster\fR\&.
+.SH "OPTIONS"
+.PP
+\-h, \-\-help
+.RS 4
+Print usage help\&.
+.RE
+.PP
+\-V, \-\-version
+.RS 4
+Print the program version\&.
+.RE
+.SH "EXAMPLES"
+.sp
+Show TODOs since the \fBv1\&.0\&.0\fR tag:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+$ git todo v1\&.0\&.0
+.fi
+.if n \{\
+.RE
+.\}
diff --git a/doc/git-todo.1.txt b/doc/git-todo.1.txt
new file mode 100644
index 0000000..61f8627
--- /dev/null
+++ b/doc/git-todo.1.txt
@@ -0,0 +1,31 @@
+git-todo(1)
+===========
+
+NAME
+----
+git-todo - Output recent TODO lines
+
+SYNOPSIS
+--------
+'git todo' [options] [<ref>]
+
+DESCRIPTION
+-----------
+Find TODO lines and output them in a grep-style format including the name
+of the file containing them and their line number.
+
+By default, outputs all TODO lines since `master`.
+
+OPTIONS
+-------
+-h, --help::
+ Print usage help.
+
+-V, --version::
+ Print the program version.
+
+EXAMPLES
+--------
+Show TODOs since the `v1.0.0` tag:
+
+ $ git todo v1.0.0