Introduction
I wanted to have the same experience across all the shells I use when building/validating Oh My Posh. It's the one feature which was missing when trying to build a seamless cross shell experience for tools you use every day.
What does it do?โ
It allows you to use a single, template enabled YAML configuration to manage the following things:
- Alias
- Function
- Precomputed variable (
var) - Environment variable
- PATH entry
- CDPATH entry
- Script
- Symbolic Link
Fork summary vs upstream mainโ
This repository includes additional changes on top of
JanDeDobbeleer/aliae main,
with emphasis on Git Bash compatibility and fork-owned release/documentation flows.
- Shell behavior and detection:
- Added Scoop support and shim-aware shell detection behavior.
init --tty-onlysupport and follow-up fixes for piped output handling.alias.typenow supportspythonandperlfor inline interpreter source fromPATH.script.typenow supportspythonandperlfor inline interpreter source fromPATH.
aliae get variablesdiagnostics to print TTY checks and resolved template variables.- Git Bash shell detection fixes, including Scoop shim-aware parent process resolution.
- Shell resolution trace output in
aliae get variables.- Windows Git Bash PATH delimiter handling fix.
- Function description support for Fish (
function --description) and Nushell (doc comment) whendescriptionis provided.
- Template capabilities:
fileExistsanddirExistshelpers.hasCommandcaching withhasCommandNoCachefor uncached checks.setArghelper for shell-agnostic positional argument assignment.progresshelper for OSC progress output and reset..ConfigPathand.ConfigDirtemplate variables..Envtemplate map for environment variable access like{{ .Env.DOTFILES }}.- Top-level
varentries with precomputed values, available as.Var.<Name>. .ShellLiketemplate variable for bash/zsh/fish/tcsh/pwsh/powershell checks..Hostnametemplate variable that exposes the system hostname..WSLtemplate variable that indicates Windows Subsystem for Linux runtime.
- PATH capabilities:
ifExistsoption to include only existing path entries.cdpathsupport with shell-specific rendering and duplicate suppression.
- Configuration capabilities:
- Top-level
cygpathmode (internalby default,externaloptional) to choose conversion backend. - Top-level
cache(enabled by default) to reuse merged+validated config when source files are unchanged. - Rendered
initoutput cache (non-stateful scripts) keyed by shell/runtime and tracked env inputs. - Top-level
extendswith short/long syntax, cycle detection, and a depth limit. - Conditional
extends[].ifsupport to skip individual extends entries when false. - Top-level
progresswith weighted automatic OSC progress acrossalias,env,path, andscript.progress.internalreserves a root-only internal init span before script output. env.isPathoption to normalize rendered path-valued env vars to OS-native separators.env.ifExistsoption (withisPath: true) to export env vars only when the rendered directory exists.- Multiline path fallback for
envvalues withisPath: true, using the first existing directory. aliae get configcommand to print the fully resolved YAML configuration.aliae validatecommand to validate raw config YAML against the schema.aliae validaterejects unknown properties while runtime init remains permissive.script.statesupport for run-once orrunEveryscheduling with timestamp state files.aliae statecommand group (listdefault,clear) to inspect and manage configured state files.
- Top-level
- Fork distribution and automation:
- Fork-oriented installer/docs references for release artifacts.
- Scoop/Homebrew bucket and tap population moved to dedicated external repositories.
- Workflow updates to align with fork publishing boundaries.
Shell strategy selection design patternโ
The shell rendering layer uses a strategy selector:
- Selector chooses which shell strategy to use.
ShellFormatStrategyencapsulates shell-specific rendering behavior.- Composite composes section renderers, each implementing
Render(), in a stable pipeline order.
Selector and strategy class diagramโ
Composite class diagramโ
I want inโ
Great, all you need is to install and configure aliae on your machine and you're good to go. Find the installation guide for your platform and have a look at the alias configuration page to get started.