diff options
-rw-r--r-- | tools/shman.sh | 17 |
1 files changed, 16 insertions, 1 deletions
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() |