Cmdliner_manpageManpages.
See Cmdliner.Manpage.
type block = [ | `S of section_name| `P of string| `Pre of string| `I of string * string| `Noblank| `Blocks of block list ]val s_name : section_nameval s_synopsis : section_nameval s_description : section_nameval s_commands : section_nameval s_arguments : section_nameval s_options : section_nameval s_common_options : section_nameval s_exit_status : section_nameval s_environment : section_nameval s_files : section_nameval s_bugs : section_nameval s_examples : section_nameval s_authors : section_nameval s_see_also : section_nameval s_none : section_nameUsed for handling the merging of metadata doc strings.
val smap_has_section : smap -> sec:section_name -> boolval smap_append_block : smap -> sec:section_name -> block -> smapsmap_append_block smap sec b appends b at the end of section sec creating it at the right place if needed.
val s_exit_status_intro : blockval s_environment_intro : blockval subst_vars :
errs:Stdlib.Format.formatter ->
subst:subst ->
Stdlib.Buffer.t ->
string ->
stringsubst b ~subst s, using b, substitutes in s variables of the form "$(doc)" by their subst definition. This leaves escapes and markup directives $(markup,…) intact.
val doc_to_plain :
errs:Stdlib.Format.formatter ->
subst:subst ->
Stdlib.Buffer.t ->
string ->
stringdoc_to_plain b ~subst s using b, substitutes in s variables by their subst definition and renders cmdliner directives to plain text.
Raises Invalid_argument in case of illegal syntax.
val doc_to_styled :
?buffer:Stdlib.Buffer.t ->
errs:Stdlib.Format.formatter ->
subst:subst ->
string ->
stringdoc_to_styled is like doc_to_plain but uses ANSI escapes.