1"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[254],{2188(e,t,n){n.r(t),n.d(t,{assets:()=>h,contentTitle:()=>c,default:()=>x,frontMatter:()=>r,metadata:()=>s,toc:()=>o});const s=JSON.parse('{"id":"segments/languages/ocaml","title":"Ocaml","description":"What","source":"@site/docs/segments/languages/ocaml.mdx","sourceDirName":"segments/languages","slug":"/segments/languages/ocaml","permalink":"/docs/segments/languages/ocaml","draft":false,"unlisted":false,"editUrl":"https://github.com/jandedobbeleer/oh-my-posh/edit/main/website/docs/segments/languages/ocaml.mdx","tags":[],"version":"current","frontMatter":{"id":"ocaml","title":"Ocaml","sidebar_label":"Ocaml"},"sidebar":"docs","previous":{"title":"Node","permalink":"/docs/segments/languages/node"},"next":{"title":"Perl","permalink":"/docs/segments/languages/perl"}}');var l=n(4848),d=n(8453),i=n(6674);const r={id:"ocaml",title:"Ocaml",sidebar_label:"Ocaml"},c=void 0,h={},o=[{value:"What",id:"what",level:2},{value:"Sample Configuration",id:"sample-configuration",level:2},{value:"Options",id:"options",level:2},{value:"Template (info)",id:"template-info",level:2},{value:"Properties",id:"properties",level:3}];function a(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,d.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.h2,{id:"what",children:"What"}),"\n",(0,l.jsxs)(t.p,{children:["Display the currently active ",(0,l.jsx)(t.a,{href:"https://ocaml.org/",children:"OCaml"})," version."]}),"\n",(0,l.jsx)(t.h2,{id:"sample-configuration",children:"Sample Configuration"}),"\n","\n",(0,l.jsx)(i.A,{data:{type:"ocaml",style:"powerline",powerline_symbol:"\ue0b0",foreground:"#d08770",template:" \ue67a {{ .Full }} "}}),"\n",(0,l.jsx)(t.h2,{id:"options",children:"Options"}),"\n",(0,l.jsxs)(t.table,{children:[(0,l.jsx)(t.thead,{children:(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.th,{children:"Name"}),(0,l.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,l.jsx)(t.th,{style:{textAlign:"center"},children:"Default"}),(0,l.jsx)(t.th,{children:"Description"})]})}),(0,l.jsxs)(t.tbody,{children:[(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{children:(0,l.jsx)(t.code,{children:"home_enabled"})}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:(0,l.jsx)(t.code,{children:"boolean"})}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:(0,l.jsx)(t.code,{children:"false"})}),(0,l.jsx)(t.td,{children:"display the segment in the HOME folder or not"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{children:(0,l.jsx)(t.code,{children:"cache_duration"})}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:(0,l.jsx)(t.code,{children:"string"})}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:(0,l.jsx)(t.code,{children:"none"})}),(0,l.jsxs)(t.td,{children:["the duration for which the version will be cached. The duration is a string in the format ",(0,l.jsx)(t.code,{children:"1h2m3s"})," and is parsed using the ",(0,l.jsx)(t.a,{href:"https://golang.org/pkg/time/#ParseDuration",children:"time.ParseDuration"})," function from the Go standard library. To disable the cache, use ",(0,l.jsx)(t.code,{children:"none"})]})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{children:(0,l.jsx)(t.code,{children:"missing_command_text"})}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:(0,l.jsx)(t.code,{children:"string"})}),(0,l.jsx)(t.td,{style:{textAlign:"center"}}),(0,l.jsx)(t.td,{children:"text to display when the command is missing"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{children:(0,l.jsx)(t.code,{children:"display_mode"})}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:(0,l.jsx)(t.code,{children:"string"})}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:(0,l.jsx)(t.code,{children:"context"})}),(0,l.jsx)(t.td,{children:(0,l.jsxs)("ul",{children:[(0,l.jsxs)("li",{children:[(0,l.jsx)(t.code,{children:"always"}),": the segment is always displayed"]}),(0,l.jsxs)("li",{children:[(0,l.jsx)(t.code,{children:"files"}),": the segment is only displayed when file ",(0,l.jsx)(t.code,{children:"extensions"})," listed are present"]}),(0,l.jsxs)("li",{children:[(0,l.jsx)(t.code,{children:"context"}),": displays the segment when the environment or files is active"]})]})})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{children:(0,l.jsx)(t.code,{children:"version_url_template"})}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:(0,l.jsx)(t.code,{children:"string"})}),(0,l.jsx)(t.td,{style:{textAlign:"center"}}),(0,l.jsxs)(t.td,{children:["a go ",(0,l.jsx)(t.a,{href:"https://golang.org/pkg/text/template/",children:"text/template"})," ",(0,l.jsx)(t.a,{href:"/docs/configuration/templates",children:"template"})," that creates the URL of the version info / release notes"]})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{children:(0,l.jsx)(t.code,{children:"extensions"})}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:(0,l.jsx)(t.code,{children:"[]string"})}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:(0,l.jsx)(t.code,{children:"*.ml, *.mli, dune, dune-project, dune-workspace"})}),(0,l.jsx)(t.td,{children:"allows to override the default list of file extensions to validate"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{children:(0,l.jsx)(t.code,{children:"folders"})}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:(0,l.jsx)(t.code,{children:"[]string"})}),(0,l.jsx)(t.td,{style:{textAlign:"center"}}),(0,l.jsx)(t.td,{children:"allows to override the list of folder names to validate"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{children:(0,l.jsx)(t.code,{children:"tooling"})}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:(0,l.jsx)(t.code,{children:"[]string"})}),(0,l.jsx)(t.td,{style:{textAlign:"center"},children:(0,l.jsx)(t.code,{children:"ocaml"})}),(0,l.jsx)(t.td,{children:"the tooling to use for fetching the version"})]})]})]}),"\n",(0,l.jsxs)(t.h2,{id:"template-info",children:["Template (",(0,l.jsx)(t.a,{href:"/docs/configuration/templates",children:"info"}),")"]}),"\n",(0,l.jsx)(t.admonition,{title:"default template",type:"note",children:(0,l.jsx)(t.pre,{children:(0,l.jsx)(t.code,{className:"language-template",children:"{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}\n"})})}),"\n",(0,l.jsx)(t.h3,{id:"properties",children:"Properties"}),"\n",(0,l.jsxs)(t.table,{children:[(0,l.jsx)(t.thead,{children:(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.th,{children:"Name"}),(0,l.jsx)(t.th,{children:"Type"}),(0,l.jsx)(t.th,{children:"Description"})]})}),(0,l.jsxs)(t.tbody,{children:[(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{children:(0,l.jsx)(t.code,{children:".Full"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.code,{children:"string"})}),(0,l.jsx)(t.td,{children:"the full version"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{children:(0,l.jsx)(t.code,{children:".Major"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.code,{children:"string"})}),(0,l.jsx)(t.td,{children:"major number"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{children:(0,l.jsx)(t.code,{children:".Minor"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.code,{children:"string"})}),(0,l.jsx)(t.td,{children:"minor number"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{children:(0,l.jsx)(t.code,{children:".Patch"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.code,{children:"string"})}),(0,l.jsx)(t.td,{children:"patch number"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{children:(0,l.jsx)(t.code,{children:".Prerelease"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.code,{children:"string"})}),(0,l.jsx)(t.td,{children:"channel name"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{children:(0,l.jsx)(t.code,{children:".Error"})}),(0,l.jsx)(t.td,{children:(0,l.jsx)(t.code,{children:"string"})}),(0,l.jsx)(t.td,{children:"error encountered when fetching the version string"})]})]})]})]})}function x(e={}){const{wrapper:t}={...(0,d.R)(),...e.components};return t?(0,l.jsx)(t,{...e,children:(0,l.jsx)(a,{...e})}):a(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.