website/docs/configuration/streaming.mdx
import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; import Config from "@site/src/components/Config.js";
:::warning Beta Feature Streaming is a beta feature under active development. The behavior and configuration may change in future releases. :::
Streaming renders your prompt progressively instead of waiting for every segment to finish. The prompt is displayed immediately, slow segments show a placeholder, and the prompt updates in place as their data becomes available.
In addition, streaming runs a single background oh-my-posh serve process per shell session
which renders every prompt on request. This removes the process start per prompt (the largest
cost on Windows) and keeps segment caches warm in memory, making every prompt faster.
The process lives and dies with your shell session, restarts automatically when it fails,
and Oh My Posh falls back to the classic per-prompt rendering when it can't be used.
Set the streaming property to a positive integer representing the timeout in milliseconds
for pending segments. Segments that don't complete within the timeout render the segment's
placeholder property (default ...) and update in place once resolved.
<Config data={{ streaming: 100, }} />
| Name | Type | Default | Description |
|---|---|---|---|
streaming | int | enable streaming mode with a timeout in milliseconds for pending segments | |
placeholder | string | ... | segment level - the text to display while the segment is still resolving |
:::warning Setting a very low timeout (e.g., 0 or 50ms) may cause visual glitches depending on the shell's rendering capabilities. We recommend starting with a timeout of around 100ms and adjusting based on your experience. :::
Streaming is supported in powershell, zsh, fish and cmd. For any other shell, the
setting has no effect and prompts render the classic way. The available functionality
differs per shell:
<Tabs defaultValue="powershell" groupId="shell" values={[ { label: 'powershell', value: 'powershell', }, { label: 'zsh', value: 'zsh', }, { label: 'fish', value: 'fish', }, { label: 'cmd', value: 'cmd', }, ] }> <TabItem value="powershell">
Requires PowerShell 6 or later for the background process; Windows PowerShell 5.1 and
sessions in ConstrainedLanguage mode use a streaming process per prompt instead.
jobs (it does not influence the job
count either). It restarts automatically when it fails, and is abandoned for the session
in favor of per-prompt rendering after repeated failuresRPROMPT) renders synchronously per prompt and is not streamedRequires Clink v1.1.42 or later.
cmd. The benefit is speed: no process start per prompt and
warm in-memory segment cachesIf you encounter issues or have suggestions for the streaming feature, please open an issue on the Oh My Posh GitHub repository.