From 7e10776abfa4aa4a4f8d96ae89232f05da60c3ff Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Thu, 27 Dec 2018 01:37:25 -0500 Subject: tools/shman.sh: Support a @purity command --- (limited to 'tools') 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() -- cgit v0.9.1