- 多 shell 混用(PowerShell、zsh、fish、nushell 都在用):一份主题配置跨 shell 复用,不用为每个 shell 各维护一套 prompt 逻辑,换 shell 时不用重写
- 需要右侧提示符或瞬态提示符:右侧提示符和瞬态提示符是内建能力,手写 PS1 做这两件事要自己处理光标定位和重绘,容易在窄终端或 tmux 里出问题
- 提示符里要放 git 状态、执行耗时、语言版本这类动态段:这些段由引擎统一计算,不必在每个 shell 里各写一遍 hook
- 想把 prompt 配置纳入 dotfiles 版本管理:主题是纯配置文件,可以跟 dotfiles 一起走 git,而不是嵌在 shell rc 文件里
oh-my-posh
JanDeDobbeleerMIT活跃维护 有专家点评跨平台 shell 提示符渲染器,支持 bash、PowerShell、fish 等,用 Go 编写,延迟低且高度可定制,能显示 Git 状态和 Nerd Fonts 图标。
The most customisable and low-latency cross platform/shell prompt renderer
专家点评
上手难度:进阶更新于 2026-11-11跨 shell 的提示符渲染引擎,取代手写 PS1 和散落在各 shell 里的 prompt 脚本
适用场景
踩坑
- 升级大版本后配置不生效:issue 里「Config file not loaded with version 26.14.2」这类配置加载问题被反复提出,跨大版本升级时先确认配置路径和 schema 是否变了,别默认旧配置能直接沿用
- PowerShell 侧脚本报错:有 omp.ps1 相关的 bug issue,Windows 上通过 PowerShell profile 加载时,profile 执行策略和加载顺序会放大这类问题
- 依赖 Nerd Font 才能正常显示图标:README 把 nerd-fonts 列为 topic,主题里的图标段在没装对应字体的终端上会显示成方块,换机器或连远程终端时先确认字体
- 安装方式 README 没给,得去官网查:不同 shell 的接入方式(hook 注入、profile 修改)各不相同,这一步是配置成本的主要来源
同类对比
starship 是直接竞品,配置用 TOML、生态更偏 Rust 工具链;如果只用一个 shell 且不想引入外部二进制,手写 PS1 加 git 的 shell 函数仍然够用。
README 未给出安装命令,请参考官方文档 https://ohmyposh.devREADME 未说明
项目说明
由 README 自动翻译提炼跨平台跨 shell 的提示符主题引擎,用配置文件和主题把命令行提示符改得又快又好看
跨平台 shell 提示符渲染器,支持 bash、PowerShell、fish 等,用 Go 编写,延迟低且高度可定制,能显示 Git 状态和 Nerd Fonts 图标。
核心能力
- 跨 shell 与跨平台通用,不绑定特定终端
- 通过配置文件高度自定义提示符外观
- 支持右侧提示符(right prompt)
- 支持瞬态提示符(transient prompt)
- 强调低延迟的快速渲染
容易踩的坑
README 未说明具体安装步骤,需自行查阅官网文档;主题与配置需另行获取,README 未提供示例
- v32.0.0最新正式版2026-11-08 · 2026-11-08 15:56 UTC
Bug Fixes
-
git: count native ahead/behind after the walk (d01ca02), closes #7954
-
ipify: use the configured url (a03f7f6)
-
studio: retry font loading after PNG export failures (8cb54a7)
-
fix(aspire)!: avoid CLI discovery on every prompt (11a939e)
BREAKING CHANGES
- Aspire CLI discovery is now opt-in via fetch_apphost: true; file-based detection remains default.
Co-authored-by: Copilot [email protected] Copilot-Session: b33a5475-612d-4d05-b2df-8d4268d38e45 Copilot-Session: 766187df-d92b-4296-920c-519cf7892b2d
-
- v31.9.12026-10-20 · 2026-10-20 09:11 UTC
查看更新说明
Bug Fixes
- android: avoid termux from crashing on memory checks (136a133)
- v31.9.02026-10-20 · 2026-10-20 06:57 UTC
- v31.8.02026-10-12 · 2026-10-12 05:51 UTC
- v31.7.02026-10-10 · 2026-10-10 07:00 UTC
查看更新说明
Features
- cli: report foreground command status (85386c0)
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
This repo was made with love using GitKraken.
Sponsors
Join the community
What started as the offspring of oh-my-posh2 for PowerShell resulted in a cross platform, highly customizable and extensible prompt theme engine. After 4 years of working on oh-my-posh, a modern and more efficient tool was needed to suit my personal needs.
:heart: Support :heart:
- One time support, or a recurring donation?
Features
- Shell and platform agnostic
- Easily configurable
- The most configurable prompt utility
- Fast
- Secondary prompt
- Right prompt
- Transient prompt
Documentation
Reviews
Thanks
- Chris Benti providing the first influence to start oh-my-posh
- Keith Dahlby for creating posh-git and making life more enjoyable
- Robby Russell for creating oh-my-zsh, without him this would probably not be here
- Janne Mareike Koschinski for providing information on how to get certain information using Go (and the amazing README)
- Starship for doing great things