about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--LICENSE4
-rw-r--r--TODO1
-rw-r--r--todo.166
3 files changed, 69 insertions, 2 deletions
diff --git a/LICENSE b/LICENSE
index 12aca95..6523c4b 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
 ISC License:
-Copyright (c) 2020, ensa
+Copyright (c) 2022, ensa
 
 Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
 
-THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/TODO b/TODO
index f8adbc4..48e3272 100644
--- a/TODO
+++ b/TODO
@@ -1,3 +1,4 @@
 implement mktemp(1) within the script file
 	mktemp is not POSIX, though it's common
 	alternatively, figure out inplace editing that's POSIX compliant
+retool -a to a non-option arg
diff --git a/todo.1 b/todo.1
new file mode 100644
index 0000000..99abf38
--- /dev/null
+++ b/todo.1
@@ -0,0 +1,66 @@
+.Dd $Mdocdate: November 17 2022 $
+.Dt TODO 1
+.Os
+.Sh NAME
+.Nm todo
+.Nd todo list manager
+.Sh SYNOPSIS
+.Nm todo
+.Oo
+.Fl e |
+.Fl x
+.Oc
+.Nm
+.Op Fl n Ar num
+.Oo
+.Fl a Ar string |
+.Fl d Op Ar num
+.Oc
+.Sh DESCRIPTION
+The
+.Nm
+utility modifies a
+.Nm
+file, which typically contains atomic tasks to be completed.
+.Pp
+The options are as follows:
+.Bl -tag -width Ds
+.It Fl a Ar string
+Appends string to the todo file.
+.It Fl d Op Ar num
+Removes line num from the todo file, and adds it to the archive.
+num may be omitted if
+.Fl n
+is specified.
+.It Fl e
+Opens the todo file in an editor.
+.It Fl n Ar num
+Chooses the line to remove or insert a line at, with
+.Fl a
+or
+.Fl d .
+.It Fl x
+Prints the contents of the archive.
+.El
+.Sh ENVIRONMENT
+.Bl -tag -width Ds
+.It Ev EDITOR
+The editor to be used with
+.Fl e .
+.It Ev TODO
+The path of the todo file.
+.El
+.Sh FILES
+.Bl -tag -width Ds
+.It Pa ~/todo
+The default todo file.
+.El
+.Sh EXAMPLES
+To insert the line
+.Dq wash the dog
+at line 10, pushing the previous line 10 and all lower lines down by one:
+.Pp
+.Dl $ todo -n 10 -a "wash the dog"
+.Sh AUTHORS
+.An ensa
+.Lk https://mommyissues.club