|
|
|
|
|
by ahnick
2168 days ago
|
|
I like the idea of combining the header with the help documentation to reduce the number of areas to maintain in smaller scripts. For larger scripts though, I think I'd still prefer to have a separate function, so that the help documentation doesn't overwhelm the initial viewing of the actual code. I also like to feed a heredoc directly into man, which allows you to achieve nicer formatting for the help documentation. Something like this... man -l - << EOF
.\" Manpage for encpass.sh.
.\" Email contact@plyint.com to correct errors or typos.
.TH man 8 "06 March 2020" "1.0" "encpass.sh man page"
.SH NAME
encpass.sh \- Use encrypted passwords in shell scripts
...
EOF
See encpass.sh for a working example of this -> https://github.com/plyint/encpass.sh/blob/master/encpass.sh |
|