diff options
-rw-r--r-- | tools/shman.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/shman.sh b/tools/shman.sh index 5e27d95..5b1a254 100644 --- a/tools/shman.sh +++ b/tools/shman.sh @@ -211,6 +211,10 @@ parse_docs() date="$(get_mtime "${file}")" + if [ -n "${tags}" ]; then + exec 3>"${tags}" + fi + while IFS='' read -r line; do case "${line}" in '##'*) @@ -233,12 +237,23 @@ parse_docs() if ${got_doc}; then gen_doc "${date}" "${source}" "${manual}" \ "${line}" ${is_func} "${doc}" "${out_dir}" + if [ -n "${tags}" ]; then + if ${is_func}; then + printf '%s()\n' "${line}" >&3 + else + printf '%s\n' "${line}" >&3 + fi + fi doc='' got_doc=false elif ${is_func}; then warn 'Undocumented function "%s"' "${line}" fi done <"${file}" + + if [ -n "${tags}" ]; then + exec 3>&- + fi } usage() |