summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2018-12-27 01:37:25 (EST)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2018-12-27 01:37:25 (EST)
commit7e10776abfa4aa4a4f8d96ae89232f05da60c3ff (patch)
treeae30672c5bc679178bd8ad30fdac241301a08370
parent83f80419b05d6e1b781cfa55bfce95b57c209129 (diff)
tools/shman.sh: Support a @purity command
-rw-r--r--tools/shman.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/shman.sh b/tools/shman.sh
index 70c202f..9334a49 100644
--- a/tools/shman.sh
+++ b/tools/shman.sh
@@ -86,6 +86,7 @@ gen_doc_func()
local first_opd=true
local sect_opds=
local sect_ret=
+ local sect_pure=
sect_name=".SH NAME${LF}${sym}"
while read -r cmd args; do
@@ -126,13 +127,17 @@ gen_doc_func()
'return')
sect_ret=".SH RETURN VALUE${LF}${args}"
;;
+ 'purity')
+ sect_pure=".SH SUBSHELL SAFETY AND SIDE EFFECTS"
+ sect_pure="${sect_pure}${LF}${args}"
+ ;;
esac
done <<-EOF
${doc}
EOF
printf '%s\n\n' "${sect_name}" "${sect_desc}" \
- "${sect_opts}" "${sect_opds}" "${sect_ret}"
+ "${sect_opts}" "${sect_opds}" "${sect_ret}" "${sect_pure}"
}
gen_doc()