linol/fmt/Fmt_cli/index.html
2024-05-08 15:15:46 +00:00

6 lines
2.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Fmt_cli (fmt.Fmt_cli)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 2.4.2"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../index.html">fmt</a> &#x00BB; Fmt_cli</nav><header class="odoc-preamble"><h1>Module <code><span>Fmt_cli</span></code></h1><p><a href="../../cmdliner/Cmdliner/index.html"><code>Cmdliner</code></a> support for <code>Fmt</code>.</p></header><nav class="odoc-toc"><ul><li><a href="#option-for-setting-the-style-renderer">Option for setting the style renderer</a></li></ul></nav><div class="odoc-content"><h2 id="option-for-setting-the-style-renderer"><a href="#option-for-setting-the-style-renderer" class="anchor"></a>Option for setting the style renderer</h2><div class="odoc-spec"><div class="spec value anchored" id="val-style_renderer"><a href="#val-style_renderer" class="anchor"></a><code><span><span class="keyword">val</span> style_renderer :
<span><span class="optlabel">?env</span>:<a href="../../cmdliner/Cmdliner/Arg/index.html#type-env">Cmdliner.Arg.env</a> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?docs</span>:string <span class="arrow">&#45;&gt;</span></span>
<span>unit <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../Fmt/index.html#type-style_renderer">Fmt.style_renderer</a> option</span> <a href="../../cmdliner/Cmdliner/Term/index.html#type-t">Cmdliner.Term.t</a></span></span></code></div><div class="spec-doc"><p><code>style_renderer ?env ?docs ()</code> is a <a href="../../cmdliner/Cmdliner/index.html"><code>Cmdliner</code></a> option <code>--color</code> that can be directly used with the optional arguments of <a href="../Fmt_tty/index.html#tty_setup" title="tty_setup">TTY setup</a> or to control <a href="../Fmt/index.html#val-set_style_renderer" title="Fmt.set_style_renderer">style rendering</a>. The option is documented under <code>docs</code> (defaults to the default in <a href="../../cmdliner/Cmdliner/Arg/index.html#type-info"><code>Cmdliner.Arg.info</code></a>).</p><p>The option is a tri-state enumerated value that when used with <a href="../Fmt_tty/index.html#tty_setup" title="tty_setup">TTY setup</a> takes over the automatic setup:</p><ul><li><code>--color=never</code>, the value is <code>Some `None</code>, forces no styling.</li><li><code>--color=always</code>, the value is <code>Some `Ansi</code>, forces ANSI styling.</li><li><code>--color=auto</code> or absent, the value is <code>None</code>, automatic setup takes place.</li></ul><p>If <code>env</code> is provided, the option default value (<code>None</code>) can be overridden by the corresponding environment variable.</p></div></div></div></body></html>