draft of man page - notes - a console notes manager using git DIR Log DIR Files DIR Refs DIR Tags DIR LICENSE --- DIR commit b3e4fc2cc7cae09643d83da834b3ee37b1274503 DIR parent 117a7f897c43230a75c3dc3ebb00bd38b6be5d49 HTML Author: Solene Rapenne <solene@perso.pw> Date: Fri, 13 Jul 2018 20:03:09 +0200 draft of man page Diffstat: A notes.1 | 92 +++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+), 0 deletions(-) --- DIR diff --git a/notes.1 b/notes.1 @@ -0,0 +1,92 @@ +.Dd $Mdocdate: July 13 2018 $ +.Dt NOTES 1 +.Os +.Sh NAME +.Nm notes +.Nd a console notes manager using git +.Sh SYNOPSIS +.Nm notes +.Nm notes +.Op Ar file +.Nm notes +.Op Ar command Op Ar file +.Sh DESCRIPTION +.Nm +is a shell script to ease plain-text notes taking and keeping history of editions with git. +.Pp +.Nm +helps working on plain text files inside a folder versionned with git. It provides commands +to display last modified files, history of a file, start a text editor for editing. Every time +.Nm +is called to edit a file, changes are commited. +.Pp +The following commands are available: +.Bl -tag -width Ds +.It Nm Cm Op ls +Show the repository tree with colours using +.Xr colortree 1 +.It Nm Cm cat Ar file +Display the content of +.Ar file +on standard output +.It Nm Cm history Ar file +Execute +.Xr tig 1 +on +.Ar file +to display commit history. +.It Nm Cm last +display files and their last commit time ordered by time. + +This is useful to find which files have been modified lastly. +.It Nm Ar file +.It Nm Cm edit Ar file +execute $EDITOR on +.Ar file +and then call +.Xr git 1 +to commit the changes on this file. The commit message is always +.Ql Edited by $USER + +If $EDITOR is not sets, +.Nm +will try to find the first editor available using +.Xr which 1 +in the following order: +.Xr nvim 1 +, +.Xr vim 1 +, +.Xr emacs 1 +and will default to +.Xr vi 1 if none of the previous is found. +.It Nm Cm init +Initialize the git repository using the command +.Ql git --init +.It Nm Cm help +display the usage help +.It Nm Cm _list +return a raw list of files. This has been made to be run for shell completion. +.It Nm Cm rm Ar file +delete +.Ar file +and commit the deletion within git. +.Sh FILES +.Bl -tag -width "~/notes" -compact +.It Pa ~/notes +default folder where +.Nm +will create a git repository. +.Sh ENVIRONMENT +.Bl -tag -width REPO +.It Ev REPO +The folder where +.Nm +will work from. It will override the default folder or allows to takes +notes in differents repositories. +.Sh EXIT +.Ex -std notes +.Sh SEE ALSO +.Xr git 1 +.Xr colortree 1 +.Xr tig 1