oh-my-posh

JanDeDobbeleerMIT活跃维护 有专家点评

跨平台 shell 提示符渲染器,支持 bash、PowerShell、fish 等,用 Go 编写,延迟低且高度可定制,能显示 Git 状态和 Nerd Fonts 图标。

The most customisable and low-latency cross platform/shell prompt renderer

v32.0.0发布于 2026-11-08 15:56 UTC23,740star +21 / 7 天2,806fork同步于 2026-11-11 05:22 UTC

专家点评

上手难度:进阶更新于 2026-11-11

跨 shell 的提示符渲染引擎,取代手写 PS1 和散落在各 shell 里的 prompt 脚本

适用场景

  • 多 shell 混用(PowerShell、zsh、fish、nushell 都在用):一份主题配置跨 shell 复用,不用为每个 shell 各维护一套 prompt 逻辑,换 shell 时不用重写
  • 需要右侧提示符或瞬态提示符:右侧提示符和瞬态提示符是内建能力,手写 PS1 做这两件事要自己处理光标定位和重绘,容易在窄终端或 tmux 里出问题
  • 提示符里要放 git 状态、执行耗时、语言版本这类动态段:这些段由引擎统一计算,不必在每个 shell 里各写一遍 hook
  • 想把 prompt 配置纳入 dotfiles 版本管理:主题是纯配置文件,可以跟 dotfiles 一起走 git,而不是嵌在 shell rc 文件里

踩坑

  • 升级大版本后配置不生效: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 提炼,执行前请确认
README 未给出安装命令,请参考官方文档 https://ohmyposh.dev
硬件要求按 README 说明

README 未说明

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

跨平台跨 shell 的提示符主题引擎,用配置文件和主题把命令行提示符改得又快又好看

跨平台 shell 提示符渲染器,支持 bash、PowerShell、fish 等,用 Go 编写,延迟低且高度可定制,能显示 Git 状态和 Nerd Fonts 图标。

核心能力

  • 跨 shell 与跨平台通用,不绑定特定终端
  • 通过配置文件高度自定义提示符外观
  • 支持右侧提示符(right prompt)
  • 支持瞬态提示符(transient prompt)
  • 强调低延迟的快速渲染

容易踩的坑

README 未说明具体安装步骤,需自行查阅官网文档;主题与配置需另行获取,README 未提供示例

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v32.0.0
  1. 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

  2. v31.9.12026-10-20 · 2026-10-20 09:11 UTC
    查看更新说明

    Bug Fixes

    • android: avoid termux from crashing on memory checks (136a133)
  3. v31.9.02026-10-20 · 2026-10-20 06:57 UTC
    查看更新说明

    Bug Fixes

    • path: cut fish folder names before escaping them (a8c00d8)
    • segments: fix icon for gradle in exemple (a06e710)
    • theme: use terminal foreground colors in kali (b093e7a)

    Features

    • jujutsu: expose working copy description (44750b8)
    • segment: add timewarrior tracking (50262c3)
  4. v31.8.02026-10-12 · 2026-10-12 05:51 UTC
    查看更新说明

    Bug Fixes

    • agents: scaffold segments with the options API (a53437e)

    Features

    • agents: block new else branches in the stop hook (fb4fc6e)
  5. v31.7.02026-10-10 · 2026-10-10 07:00 UTC
    查看更新说明

    Features

    • cli: report foreground command status (85386c0)

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    MIT license badge

    Build Status badge

    Release version number badge

    Documentation link badge ohmyposh.dev

    Number of GitHub Downloads badge

    This repo was made with love using GitKraken.

    GitKraken shield

    Sponsors

    Want to become a sponsor?

    Join the community

    Mastodon badge

    Discord badge

    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:

    GitHub - One time support, or a recurring donation?

    Ko-Fi - No coffee, no code.

    Features

    • Shell and platform agnostic
    • Easily configurable
    • The most configurable prompt utility
    • Fast
    • Secondary prompt
    • Right prompt
    • Transient prompt

    Documentation

    Documentation

    Reviews

    Thanks