Streaming (Beta)
Streaming is an experimental beta feature that is currently under active development. The behavior and configuration may change in future releases. Use with caution in production environments.
What is Streaming?โ
Streaming is a new rendering mode for Oh My Posh that displays your prompt progressively as segments complete their execution. Instead of waiting for all segments to finish before showing the prompt, streaming mode shows an initial prompt immediately and updates it incrementally as data becomes available.
How Does It Work?โ
In the traditional rendering mode, Oh My Posh:
- Executes all segments (some may take time to fetch data from APIs, run commands, etc.)
- Waits for all segments to complete
- Renders the complete prompt once
- Displays the result
With streaming mode, Oh My Posh:
- Immediately displays a prompt with fast segments
- Shows
...for segments that are still loading (override using the segment'splaceholderproperty) - Progressively updates the prompt as slow segments complete
- Re-renders the prompt with updated data
This provides a more responsive experience, especially when you have segments that fetch remote data or perform time-consuming operations.
Enabling Streamingโ
To enable streaming mode, add the streaming property to your configuration file and set it to a positive integer representing the timeout in milliseconds for pending segments. For example:
- json
- yaml
- toml
{
"streaming": 100
}
streaming: 100
streaming = 100
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.
Shell Supportโ
Streaming mode is currently supported in:
- PowerShell (version 7.2+)
- Zsh
- Fish
Support for additional shells may be added in future releases.
Feedbackโ
If you encounter issues or have suggestions for the streaming feature, please open an issue on the Oh My Posh GitHub repository.