Skip to main content

Transient prompt


This feature only works in fish, zsh, powershell and cmd for the time being.

Transient prompt, when enabled, replaces the prompt with a simpler one to allow more screen real estate. You can use go text/template templates extended with sprig to enrich the text. Environment variables are available, just like the console_title_template functionality.

Typically, your prompt will simply leave the prompt on the screen when you execute a command (or press enter) like so:

Before Transient

By enabling Transient Prompt, you can replace the prompt with some other content for a cleaner console as shown here:

After Transient


You need to extend or create a custom theme with your transient prompt. For example:

"$schema": "",
"blocks": {
"transient_prompt": {
"background": "transparent",
"foreground": "#ffffff",
"template": "{{ .Shell }}> "

The configuration has the following properties:

Template (info)#

  • .Root: boolean - is the current user root/admin or not
  • .PWD: string - the current working directory
  • .Folder: string - the current working folder
  • .Shell: string - the current shell name
  • .UserName: string - the current user name
  • .HostName: string - the host name
  • .Code: int - the last exit code
  • .Env.VarName: string - Any environment variable where VarName is the environment variable name

Enable the feature#

Invoke Oh My Posh in your $PROFILE and add the following line below.

oh-my-posh init pwsh --config $env:POSH_THEMES_PATH/jandedobbeleer.omp.json | Invoke-Expression

If you import PSReadLine separately, make sure to import it before the Enable-PoshTransientPrompt command.

Restart your shell or reload your $PROFILE using . $PROFILE for the changes to take effect.