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"
weight: 1.25
- 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"
- value: |
import os
print(os.getenv("SHELL", ""))
type: python
- value: |
print $^O
type: perl
- value: |
eval "$(starship init bash)"
state:
file: starship-init.state
runEvery: 24h
format: json

Pathโ€‹

NameTypeDescription
valuestringthe script you want to load. Supports templating
typestringshell (default), python, or perl
ifstringgolang template conditional statement, see if
weightfloat64optional automatic progress weight (> 0, default: 1)
stateobjectoptional script state controls (file, optional runEvery, optional format)

python and perl script types are not available in tcsh.

When state.file is set, aliae tracks last run time in a state file:

  • Windows: %LOCALAPPDATA%/aliae/state/<file>
  • Linux/macOS: ~/.local/aliae/state/<file>

state.runEvery uses Go duration syntax (for example 15m, 24h). If omitted, the script runs once and then stays skipped.

Use aliae state (or aliae state list) to inspect configured states, and aliae state clear to remove referenced state files.