From 227d317d68516eff5e7f0a9883439d64b220fa81 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Thu, 27 Dec 2018 01:45:34 -0500 Subject: tools/shman.sh: Add @stdin, @stdout, and @stderr commands --- (limited to 'tools') diff --git a/tools/shman.sh b/tools/shman.sh index 9334a49..2084bf7 100644 --- a/tools/shman.sh +++ b/tools/shman.sh @@ -85,9 +85,14 @@ gen_doc_func() local req= local first_opd=true local sect_opds= + local sect_in= local sect_ret= + local sect_out= + local sect_err= local sect_pure= + # TODO: SYNOPSIS + sect_name=".SH NAME${LF}${sym}" while read -r cmd args; do case "${cmd}" in @@ -124,9 +129,18 @@ gen_doc_func() sect_opds="${sect_opds}.TP${LF}.I ${opd}${LF}" sect_opds="${sect_opds}${desc}${LF}" ;; + 'stdin') + sect_in=".SH STDIN${LF}${args}" + ;; 'return') sect_ret=".SH RETURN VALUE${LF}${args}" ;; + 'stdout') + sect_out=".SH STDOUT${LF}${args}" + ;; + 'stderr') + sect_err=".SH STDERR${LF}${args}" + ;; 'purity') sect_pure=".SH SUBSHELL SAFETY AND SIDE EFFECTS" sect_pure="${sect_pure}${LF}${args}" @@ -137,7 +151,8 @@ gen_doc_func() EOF printf '%s\n\n' "${sect_name}" "${sect_desc}" \ - "${sect_opts}" "${sect_opds}" "${sect_ret}" "${sect_pure}" + "${sect_opts}" "${sect_opds}" "${sect_in}" "${sect_ret}" \ + "${sect_out}" "${sect_err}" "${sect_pure}" } gen_doc() -- cgit v0.9.1