ClaudeandJan De Dobbeleer 4709f3e237 fix(serve): forward the full environment to the streaming daemon
When streaming is enabled, the daemon only saw environment variable
changes for a hardcoded whitelist (PATH, POSH_* variables, VIRTUAL_ENV,
CONDA_PROMPT_MODIFIER), forwarded per-prompt by the shell integration
scripts. Anything outside that whitelist - like a variable direnv
exports - stayed pinned to whatever value existed when the daemon
started, so `{{ .Env.XXX }}` templates never picked up live changes.

The daemon now reads the shell's complete environment on every prompt
instead: each request's JSON header is unconditionally followed by a
raw "KEY=VALUE\0" record stream terminated by an empty record, which
the daemon parses with readEnvBlob before applying it via the existing
overlay/unset machinery. This wire format needs no escaping (env
values can never contain a NUL byte on any OS), fixing latent
correctness bugs in the shell-side JSON escapers it replaces (fish
silently dropped embedded newlines; zsh's control-character stripper
only handled the first stray character due to a single-substitution
bug) and is cheaper to produce than the JSON it replaces, particularly
in fish.

All four shell integrations (fish, zsh, pwsh, cmd/Clink) were updated
to send the full env this way instead of a whitelist, including at
their abort/quit call sites, which now also send the (empty) blob
every request line requires to keep the stream in sync.

Fixes #7792.
2026-08-12 22:58:14 +02:00
2026-07-10 16:43:37 +02:00
2025-09-11 11:23:29 +02:00
2026-07-13 16:30:38 +02:00
2024-09-19 08:29:35 +02:00
2026-08-03 07:50:10 +02:00
2026-08-03 13:27:25 +02:00
2026-02-16 16:26:51 +01:00
2026-08-09 12:08:05 +02:00
2026-07-15 09:05:39 +02:00
2022-02-28 07:48:03 +01:00
2023-10-05 11:41:05 +02:00

Oh My Posh logo – Prompt theme engine for any shell

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

CodeRabbit J

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.

❤️ Support ❤️

Swag - Show your love with a t-shirt!

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

S
Description
The most customisable and low-latency cross platform/shell prompt renderer
Readme
159 MiB
Languages
Go 66.1%
MDX 19.2%
JavaScript 9%
PowerShell 2%
Shell 1.7%
Other 1.7%