Skip to main content

Templates

Exampleโ€‹

env:
- name: POSH_THEME
value: {{ .Home }}/.configs/posh.omp.yaml

Descriptionโ€‹

Some fields have text/template abilities, allowing to reuse the same configuration across multiple environments resulting in environment specific values.

Out of the box you get the following functionality:

NameTypeDescriptionExample
.Shellstringthe current shell name{{ .Shell }}
.Homestringthe user's $HOME folder{{ .Home }}/go/bin/aliae
.OSstringthe current operating system (windows, darwin, linux){{ .Home }}/go/bin/aliae{{ if eq .OS "windows" }}.exe{{ end }}
.Archstringthe aliae executable's compiled architecture{{ .Home }}/go/bin/aliae-{{ .Arch }}{{ if eq .OS "windows" }}.exe{{ end }}
envstringretrieve an environment variable value{{ env "POSH_THEME" }}
matchbooleanmatch a shell name to one or multiple options{{ match .Shell "zsh" "bash" }}
hasCommandbooleancheck if an executable exists{{ hasCommand "oh-my-posh" }}