mirror of
https://github.com/c-cube/linol.git
synced 2025-12-06 03:05:31 -05:00
6 lines
3 KiB
HTML
6 lines
3 KiB
HTML
<!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 3.0.0"/><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">Index</a> » <a href="../index.html">fmt</a> » 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><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#option-for-setting-the-style-renderer">Option for setting the style renderer</a></li></ul></nav></div><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/Cmd/Env/index.html#type-info">Cmdliner.Cmd.Env.info</a> <span class="arrow">-></span></span>
|
||
<span><span class="optlabel">?docs</span>:string <span class="arrow">-></span></span>
|
||
<span>unit <span class="arrow">-></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_tty</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>
|