PageSourceSearch

https://ohmyposh.dev/assets/js/4ac60e6d.bc48ffd2.js

js ohmyposh.dev collected 2026-09-24 18:50:00 UTC 8,145 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3882],{2498(e,t,n){n.r(t),n.d(t,{assets:()=>h,contentTitle:()=>c,default:()=>a,frontMatter:()=>r,metadata:()=>s,toc:()=>o});const s=JSON.parse('{"id":"segments/languages/kotlin","title":"Kotlin","description":"What","source":"@site/docs/segments/languages/kotlin.mdx","sourceDirName":"segments/languages","slug":"/segments/languages/kotlin","permalink":"/docs/segments/languages/kotlin","draft":false,"unlisted":false,"editUrl":"https://github.com/jandedobbeleer/oh-my-posh/edit/main/website/docs/segments/languages/kotlin.mdx","tags":[],"version":"current","frontMatter":{"id":"kotlin","title":"Kotlin","sidebar_label":"Kotlin"},"sidebar":"docs","previous":{"title":"Julia","permalink":"/docs/segments/languages/julia"},"next":{"title":"Language","permalink":"/docs/segments/languages/language"}}');var i=n(4848),l=n(8453),d=n(6674);const r={id:"kotlin",title:"Kotlin",sidebar_label:"Kotlin"},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:"Options",id:"options-1",level:2},{value:"Template (info)",id:"template-info",level:2},{value:"Properties",id:"properties",level:3}];function x(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,l.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h2,{id:"what",children:"What"}),"\n",(0,i.jsxs)(t.p,{children:["Display the currently active ",(0,i.jsx)(t.a,{href:"https://kotlinlang.org/",children:"Kotlin"})," version."]}),"\n",(0,i.jsx)(t.h2,{id:"sample-configuration",children:"Sample Configuration"}),"\n","\n",(0,i.jsx)(d.A,{data:{type:"kotlin",style:"powerline",powerline_symbol:"\ue0b0",foreground:"#ffffff",background:"#906cff",template:" \ue634 {{ .Full }} "}}),"\n",(0,i.jsx)(t.h2,{id:"options",children:"Options"}),"\n",(0,i.jsx)(t.h2,{id:"options-1",children:"Options"}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Name"}),(0,i.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,i.jsx)(t.th,{style:{textAlign:"center"},children:"Default"}),(0,i.jsx)(t.th,{children:"Description"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"home_enabled"})}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:(0,i.jsx)(t.code,{children:"boolean"})}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:(0,i.jsx)(t.code,{children:"false"})}),(0,i.jsx)(t.td,{children:"display the segment in the HOME folder or not"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"cache_duration"})}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:(0,i.jsx)(t.code,{children:"string"})}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:(0,i.jsx)(t.code,{children:"none"})}),(0,i.jsxs)(t.td,{children:["the duration for which the version will be cached. The duration is a string in the format ",(0,i.jsx)(t.code,{children:"1h2m3s"})," and is parsed using the ",(0,i.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,i.jsx)(t.code,{children:"none"})]})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"missing_command_text"})}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:(0,i.jsx)(t.code,{children:"string"})}),(0,i.jsx)(t.td,{style:{textAlign:"center"}}),(0,i.jsx)(t.td,{children:"text to display when the command is missing"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"display_mode"})}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:(0,i.jsx)(t.code,{children:"string"})}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:(0,i.jsx)(t.code,{children:"context"})}),(0,i.jsx)(t.td,{children:(0,i.jsxs)("ul",{children:[(0,i.jsxs)("li",{children:[(0,i.jsx)(t.code,{children:"always"}),": the segment is always displayed"]}),(0,i.jsxs)("li",{children:[(0,i.jsx)(t.code,{children:"files"}),": the segment is only displayed when file ",(0,i.jsx)(t.code,{children:"extensions"})," listed are present"]}),(0,i.jsxs)("li",{children:[(0,i.jsx)(t.code,{children:"context"}),": displays the segment when the environment or files is active"]})]})})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"version_url_template"})}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:(0,i.jsx)(t.code,{children:"string"})}),(0,i.jsx)(t.td,{style:{textAlign:"center"}}),(0,i.jsxs)(t.td,{children:["a go ",(0,i.jsx)(t.a,{href:"https://golang.org/pkg/text/template/",children:"text/template"})," ",(0,i.jsx)(t.a,{href:"/docs/configuration/templates",children:"template"})," that creates the URL of the version info / release notes"]})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"extensions"})}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:(0,i.jsx)(t.code,{children:"[]string"})}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:(0,i.jsx)(t.code,{children:"*.kt, *.kts, *.ktm"})}),(0,i.jsx)(t.td,{children:"allows to override the default list of file extensions to validate"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"folders"})}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:(0,i.jsx)(t.code,{children:"[]string"})}),(0,i.jsx)(t.td,{style:{textAlign:"center"}}),(0,i.jsx)(t.td,{children:"allows to override the list of folder names to validate"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"tooling"})}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:(0,i.jsx)(t.code,{children:"[]string"})}),(0,i.jsx)(t.td,{style:{textAlign:"center"},children:(0,i.jsx)(t.code,{children:"kotlin"})}),(0,i.jsx)(t.td,{children:"the tooling to use for fetching the version"})]})]})]}),"\n",(0,i.jsxs)(t.h2,{id:"template-info",children:["Template (",(0,i.jsx)(t.a,{href:"/docs/configuration/templates",children:"info"}),")"]}),"\n",(0,i.jsx)(t.admonition,{title:"default template",type:"note",children:(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-template",children:"{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}\n"})})}),"\n",(0,i.jsx)(t.h3,{id:"properties",children:"Properties"}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Name"}),(0,i.jsx)(t.th,{children:"Type"}),(0,i.jsx)(t.th,{children:"Description"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:".Full"})}),(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"string"})}),(0,i.jsx)(t.td,{children:"the full version"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:".Major"})}),(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"string"})}),(0,i.jsx)(t.td,{children:"major number"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:".Minor"})}),(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"string"})}),(0,i.jsx)(t.td,{children:"minor number"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:".Patch"})}),(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"string"})}),(0,i.jsx)(t.td,{children:"patch number"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:".URL"})}),(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"string"})}),(0,i.jsx)(t.td,{children:"URL of the version info / release notes"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:".Error"})}),(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"string"})}),(0,i.jsx)(t.td,{children:"error encountered when fetching the version string"})]})]})]})]})}function a(e={}){const{wrapper:t}={...(0,l.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(x,{...e})}):x(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.