---
id: faq
title: FAQ
sidebar_label: 🤨 FAQ
---

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

Before validating anything, make sure you're on the [latest version][latest] of Oh My Posh and your terminal and shell are up-to-date.

### The prompt is slow (delay in showing the prompt between commands)

<Tabs
  defaultValue="powershell"
  groupId="shell"
  values={[
    { label: 'powershell', value: 'powershell', },
    { label: 'others', value: 'others', },
  ]
}>
<TabItem value="powershell">

You can use the `Write-PoshDebug` function to see where Oh my posh spends its time.
In case there's no clear culprit (timings indicate everything's OK), chances are some modules are the culprit.
We bootstrap afew PowerShell modules to maximise compatibility, but sometimes these can introduce unwanted side-effects.

The modules we support are:

- posh-git
- Az.Accounts

Especially the latter can slow things down so the first thing to do is disable that one:

```powershell
$env:AZ_ENABLED=$false
```

Once added, reload your profile for the changes to take effect.

```powershell
. $PROFILE
```

</TabItem>
<TabItem value="others">

You can use the Oh My Posh's built-in `--debug` flag to identify slow segments.

```bash
oh-my-posh --config ~/.mytheme.omp.json --debug --shell uni
```

Whenever there's a segment that spikes, see if there might be updates to the underlying functionality (usually shell commands).

</TabItem>
</Tabs>

If nothing seems to resolve the issue, feel free to [create an issue][new-issue].

### Windows Terminal: Unexpected space between segments/text

Windows Terminal has some issues with [rendering certain glyphs][wt-glyph]. These issues are on [their backlog][wt-glyphs].
A temporary workaround is to use an invisible character at the end (`\u2800`).

```json
{
    "type": "executiontime",
    /* other attributes here */
    "properties": {
    "always_enabled": true,
    "prefix": "\ufbab",
    "postfix": "\u2800" // invisible spacing character
    }
}
```

### There are rectangles instead of icons in my prompt

The font you're using doesn't have the needed standard extended glyph set like [Nerd Font][nf] does.
Windows Terminal ships with Cascadia Code by default which has a powerline patched variant called Cascadia Code PL,
but also that one misses certain interesting icons. You can fall back to any theme with the `.minimal` indication,
or make use of a Nerd Font. Have a look at the [font][font] section for more context in case you're using all the right conditions.

### Jetbrains terminals: Icons do not render

They need to work on their terminal, somehow it only supports UTF-8 and not UTF-16.
[An issue][jb-icons] is available for a follow-up here.

### The term 'Set-Theme' is not recognized as the name of a cmdlet, function, script file, or operable program.

You need to migrate V2 to V3 using the following [guide][upgrading]. The quick fix is to replace `Set-Theme` with `Set-PoshPrompt`,
but it's advised to read the guide.

### Strange colouring after exiting VIM or when using the PowerShell progress bootstrap

This bug is caused by Windows Terminal and/or VIM. There are two issues for this, one at [Windows Terminal][wt-vim] and
one at [VIM][vim-wt].

### ZSH: No command history (ctrl+r does not work)

This issue occurs when you're using plain ZSH in combination with Oh My Posh.
You fix this by can adding the right configuration to `~/.zshrc`.

```bash
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
setopt appendhistory
```

### PowerShell: Running in ConstrainedLanguage mode

You're here because you've seen the following message:

```powershell
[WARNING] ConstrainedLanguage mode detected, unable to set console to UTF-8.
When using PowerShell in ConstrainedLanguage mode, please set the
console mode manually to UTF-8. See here for more information:
https://ohmyposh.dev/docs/faq#powershell-running-in-constrainedlanguage-mode
```

When running PowerShell in ConstrainedLanguage mode, we can't set the console to UTF-8. This will cause the prompt to be rendered incorrectly.
There's a few [options][utf-8] to set the console to UTF-8 from an OS perspective on Windows, other systems shouldn't be impacted.

To remove the message after manual configuration, you can add the following to your `$PROFILE` before importing Oh My Posh:

```powershell
$env:POSH_CONSTRAINED_LANGUAGE = 1
```

### Conda: environment name displayed in front of the prompt

Conda will automatically prepend the prompt with the name of the environment you're in.
To solely rely on Oh My Posh to set the prompt, you can configure the follwing setting to hide it:

```bash
conda config --set changeps1 False
```

### Python venv: Prompt changes on activating virtual environment
Virtual environments created with `venv` add the active environment's name to the prompt automatically.
To disable this behaviour, set `VIRTUAL_ENV_DISABLE_PROMPT` environment variable to `1` on your system. Example files:

Note: Tilde (~) in paths refers to your user's home directory.

<Tabs
  defaultValue="powershell"
  groupId="shell"
  values={[
    { label: 'powershell', value: 'powershell', },
    { label: 'fish', value: 'fish', },
    { label: 'others', value: 'others', },
  ]
}>
<TabItem value="powershell">

```powershell
# ~/Documents/WindowsPowerShell/profile.ps1
$env:VIRTUAL_ENV_DISABLE_PROMPT=1
```

</TabItem>
<TabItem value="fish">

```fish
# ~/.config/fish/config.fish
set -x VIRTUAL_ENV_DISABLE_PROMPT 1
```

</TabItem>
<TabItem value="others">

```bash
# ~/.bashrc (bash) or ~/.zprofile or ~/.zshrc (zsh)
export VIRTUAL_ENV_DISABLE_PROMPT=1
```

</TabItem>
</Tabs>

[new-issue]: https://github.com/JanDeDobbeleer/oh-my-posh/issues/new/choose
[latest]: https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest
[wt-glyph]: https://github.com/microsoft/terminal/issues/3546
[wt-glyphs]: https://github.com/microsoft/terminal/issues?q=is%3Aissue+is%3Aopen+unicode+width
[nf]: https://www.nerdfonts.com/
[font]: /docs/config-fonts
[jb-icons]: https://youtrack.jetbrains.com/issue/IDEA-248010
[upgrading]: upgrading.md
[wt-vim]: https://github.com/microsoft/terminal/issues/3794
[vim-wt]: https://github.com/vim/vim/issues/5092
[utf-8]: https://github.com/PowerShell/PowerShell/issues/7233#issuecomment-640243647
