I am writing a few custom man
pages and I would like to include things that might change often such as the date of the man
page's writing.
For example, one is in a git
repo that I would like to update the man
page's date whenever a change is made to it without having to do it by hand.
Is there a possibility to #include
or call shell variables in the *roff
file, or perhaps a markdown file and then use pandoc
to "compile" the man
page with?
I understand this is a strange question, but I haven't come across anything similar.
Please note this is different than simply including a man page in the $MANPATH
to be called by man
.
I.E., I want to use something like:
.TH foo 10 "$(git log -n1 | grep Date | tail -c 31)" "$(git branch | grep "*")"
in place of having to manually change the date and branch/head name every time. Whether this is in markdown and given to pandoc
or something else or just in the roff
file itself, I am okay with either.