Nat TaylorBlog, AI, Product Management & Tinkering

Adding your own man pages

Published on .

I confess that there’s some stuff I do on the command line that I immediately forget, and then find myself weeks later Googling for the same things. For a time I adopted a convention of having a simple help function in my ~/.zshrc to help remember, but now I’ve adopted man pages. So if you want your own:

  1. mkdir -p ~/man/man1
  2. Add to ~/.zshrc the line export MANPATH="$MANPATH:/Users/username/man"
  3. Add an entry pbpaste > man/man1/foo.1

Now so long as I write myself a note in my manual, then I can run man ntaylor to remind myself! I like this because it’s memorable.

It also has me thinking that it might be cool to install man <companyName> on new developer laptops with tips and tricks, or something.

In my case I used pandoc (which you can try online) to convert from Markdown to man format.

.SH NAME
.PP
ntaylor
.SH SYNOPSIS
.PP
ntaylor [\f[I]options\f[R]] [\f[I]input-file\f[R]]\&...
.SH DESCRIPTION
.PP
[Jupyter Notebook Venv]
.IP
.nf
\f[C]
python -m venv myname
source myname/bin/activate
(myname) python -m ipykernel_launcher install --user --name=myname
(myname) jupyter kernelspec list
ipython kernel install --user --name=commerce_links
\f[R]
.fi
.PP
[Background Process]
.IP
.nf
\f[C]
nohup python -m  http.server 80 > server.log 2>&1 &
\f[R]
.fi

Post Navigation

«
»