Skip to main content

Script

Specify the same script cross shell.

Syntaxโ€‹

script:
- value: |
oh-my-posh init nu
source ~/.oh-my-posh.nu
if: match .Shell "nu"
- value: |
load(io.popen('oh-my-posh init cmd'):read("*a"))()
if: match .Shell "cmd"
- value: |
oh-my-posh init pwsh | Invoke-Expression
if: match .Shell "pwsh"
- value: |
[[ -f "$HOME/.fig/shell/{{ .Shell }}rc.pre.{{ .Shell }}" ]] && builtin source "$HOME/.fig/shell/{{ .Shell }}rc.pre.{{ .Shell }}"

eval "$(oh-my-posh init {{ .Shell }})"
[ -f ~/.fzf.{{ .Shell }} ] && source ~/.fzf.{{ .Shell }}

[[ -f "$HOME/.fig/shell/{{ .Shell }}rc.post.{{ .Shell }}" ]] && builtin source "$HOME/.fig/shell/{{ .Shell }}rc.post.{{ .Shell }}"
if: match .Shell "bash" "zsh"

Pathโ€‹

NameTypeDescription
valuestringthe script you want to load. Supports templating
ifstringgolang template conditional statement, see if