summaryrefslogtreecommitdiffstats
path: root/tools/shman.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/shman.sh')
-rwxr-xr-xtools/shman.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/shman.sh b/tools/shman.sh
index 34c607e..8e4cfdc 100755
--- a/tools/shman.sh
+++ b/tools/shman.sh
@@ -88,6 +88,7 @@ gen_doc_func()
local sect_ret=
local sect_out=
local sect_err=
+ local pure=
local sect_attr=
# TODO: SYNOPSIS
@@ -140,9 +141,14 @@ gen_doc_func()
'stderr')
sect_err=".SH STDERR${LF}${args}"
;;
- 'purity')
- sect_attr=".SH ATTRIBUTES"
- sect_attr="${sect_attr}${LF}${args}"
+ 'pure')
+ read -r pure desc <<-EOF
+ ${args}
+ EOF
+ sect_attr=".SH ATTRIBUTES${LF}"
+ sect_attr="${sect_attr}.TP${LF}"
+ sect_attr="${sect_attr}Subshell-safe: ${pure}"
+ sect_attr="${sect_attr}${LF}${desc}"
;;
esac
done <<-EOF