linol/cmdliner/Cmdliner/Cmd/Env/index.html
2025-11-26 00:50:10 +00:00

7 lines
4 KiB
HTML
Raw Permalink 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>Env (cmdliner.Cmdliner.Cmd.Env)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.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> &#x00BB; <a href="../../../index.html">cmdliner</a> &#x00BB; <a href="../../index.html">Cmdliner</a> &#x00BB; <a href="../index.html">Cmd</a> &#x00BB; Env</nav><header class="odoc-preamble"><h1>Module <code><span>Cmd.Env</span></code></h1><p>Environment variable and their information.</p></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#envvars">Environment variables</a></li><li><a href="#info">Environment variable information</a></li></ul></nav></div><div class="odoc-content"><h2 id="envvars"><a href="#envvars" class="anchor"></a>Environment variables</h2><div class="odoc-spec"><div class="spec type anchored" id="type-var"><a href="#type-var" class="anchor"></a><code><span><span class="keyword">type</span> var</span><span> = string</span></code></div><div class="spec-doc"><p>The type for environment variable names.</p></div></div><h2 id="info"><a href="#info" class="anchor"></a>Environment variable information</h2><div class="odoc-spec"><div class="spec type anchored" id="type-info"><a href="#type-info" class="anchor"></a><code><span><span class="keyword">type</span> info</span></code></div><div class="spec-doc"><p>The type for environment variable information.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-info"><a href="#val-info" class="anchor"></a><code><span><span class="keyword">val</span> info :
<span><span class="optlabel">?deprecated</span>:string <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?docs</span>:<a href="../../Manpage/index.html#type-section_name">Manpage.section_name</a> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?doc</span>:string <span class="arrow">&#45;&gt;</span></span>
<span><a href="#type-var">var</a> <span class="arrow">&#45;&gt;</span></span>
<a href="#type-info">info</a></span></code></div><div class="spec-doc"><p><code>info ~docs ~doc var</code> describes an environment variable <code>var</code> such that:</p><ul><li><code>doc</code> is the man page information of the environment variable, defaults to <code>&quot;See option $(opt).&quot;</code>.</li><li><code>docs</code> is the title of the man page section in which the environment variable will be listed, it defaults to <a href="../../Manpage/index.html#val-s_environment"><code>Cmdliner.Manpage.s_environment</code></a>.</li><li><code>deprecated</code>, if specified the environment variable is deprecated. Use of the variable warns on dep<code>stderr</code> This message which should be a capitalized sentence is preprended to <code>doc</code> and output on standard error when the environment variable ends up being used.</li></ul><p>In <code>doc</code> and <code>deprecated</code> the <a href="../../../tool_man.html#doclang" title="doclang">documentation markup language</a> can be used with following variables:</p><ul><li><code>$(opt)</code>, if any the option name of the argument the variable is looked up for.</li><li><code>$(env)</code>, the value of <code>var</code>.</li><li>The variables mentioned in the doc string of <a href="../index.html#val-info"><code>Cmd.info</code></a>.</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-info_var"><a href="#val-info_var" class="anchor"></a><code><span><span class="keyword">val</span> info_var : <span><a href="#type-info">info</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-var">var</a></span></code></div><div class="spec-doc"><p><code>info_var info</code> is the variable described by <code>info</code>.</p></div></div></div></body></html>