Skip to content

Releases: JanDeDobbeleer/oh-my-posh

v28.0.0

23 Nov 17:01

Choose a tag to compare

Features

  • command: remove command segment (6180d88)

BREAKING CHANGES

  • command: The command segment has been completely removed.
    Users must update configurations to use built-in segments or
    alternative approaches.

The following built-in themes have been updated to remove command
segments:

  • pararussel.omp.json - Removed git commit time display
  • tokyonight_storm.omp.json - Removed git commit time display
  • glowsticks.omp.yaml - Removed custom git status and weather segments

If your configuration uses the command segment, you have several
alternatives:

Replace command segments with equivalent built-in segments where
possible:

Before (command segment):

{
  "type": "command",
  "properties": {
    "command": "git log --pretty=format:%cr -1",
    "shell": "bash"
  }
}

After (git segment):

{
  "type": "git",
  "properties": {
    "branch_icon": "",
    "commit_icon": "",
    "tag_icon": ""
  },
  "template": "{{ .HEAD }} ({{ .Behind }}{{ .Ahead }})"
}

Oh My Posh provides a set_poshcontext shell function that allows you
to populate environment variables before each prompt render. This is
perfect for replacing command segments:

Before (command segment):

{
  "type": "command",
  "properties": {
    "command": "git log --pretty=format:%cr -1 || echo 'No commits'",
    "shell": "bash"
  }
}

After (using set_poshcontext + text segment):

Shell configuration (e.g., .bashrc, .zshrc):

function set_poshcontext() {
    export POSH_GIT_LAST_COMMIT=$(git log --pretty=format:%cr -1 2>/dev/null || echo 'No commits')
}

Oh My Posh configuration:

{
  "type": "text",
  "template": "{{ .Env.POSH_GIT_LAST_COMMIT }}"
}

For complex shell commands, consider:

  • Moving logic to external scripts

  • Using environment variables set by shell initialization

  • Implementing custom segments (for advanced users)

  • Text segment: For static text replacement

  • Environment variables: For dynamic values set outside Oh My Posh

  • Built-in segments: Many common use cases are covered by existing segments

The command segment was removed for the following reasons:

  1. Security: Arbitrary command execution in prompt rendering poses security risks
  2. Performance: Shell command execution can significantly slow down prompt rendering

v27.6.0

13 Nov 20:47

Choose a tag to compare

Bug Fixes

  • git: convert configData to []byte for ini.Load to parse content (02740bf)
  • path: handle multi-byte unicode characters in fish-style path (7f9ac1e)

Features

  • prompt: add WSL path conversion for OSC99 (9e98cd7)

v27.5.2

06 Nov 17:08

Choose a tag to compare

Bug Fixes

  • dsc: persist cache for dsc config set (dba99ca)

v27.5.1

05 Nov 19:21

Choose a tag to compare

Bug Fixes

  • workflow: replace stderr redirection with bash error handling in ai-changelog (64c8268)

v27.5.0

04 Nov 14:01

Choose a tag to compare

Bug Fixes

  • mcp: embed schema in function on build (8f4a097)
  • mcp: improve JSON-RPC request body parsing and add debug logging (1dc8767)
  • mcp: resolve race conditions and improve schema loading reliability (31e262f)

Features

  • update install.ps1 to use MSIX packages from GitHub releases (2d33f6f)

v27.4.4

31 Oct 21:10

Choose a tag to compare

Bug Fixes

  • msix: use executable name instead of path (b0a78d0)

v27.4.3

30 Oct 16:47

Choose a tag to compare

Bug Fixes

  • msi: remove redundant unvirtualizedResources (293e371)
  • upgrade: add --auto flag to upgrade command (fcd4b0e)

v27.4.2

30 Oct 09:04

Choose a tag to compare

Bug Fixes

  • msix: add ignorable namespaces (e54e20a)
  • msix: adjust windows versions (ed99ba5)

v27.4.1

29 Oct 07:03

Choose a tag to compare

Bug Fixes

  • dsc: remove incorrect return argument in resources (203429f), closes #6882
  • init: disable when running inside cursor agent mode (d04322b), closes #6891

v27.4.0

26 Oct 13:14

Choose a tag to compare

Bug Fixes

  • font: unvirtualize the registry for font installs (2dc8b0c), closes #6909

Features

  • msix: add theme files to package (8841984)