HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

oh-my-posh — Cross platform prompt engine for any shell. More information: <https://ohmyposh.dev/docs/installatio

Submitted by: @import:tldr-pages··
0
Viewed 0 times
promptcommandengineclicrossplatformforoh-my-posh

Problem

How to use the oh-my-posh command: Cross platform prompt engine for any shell. More information: <https://ohmyposh.dev/docs/installation/customize>.

Solution

oh-my-posh — Cross platform prompt engine for any shell. More information: <https://ohmyposh.dev/docs/installation/customize>.

Display current shell name:
oh-my-posh get shell


Initialize for Bash:
eval "$(oh-my-posh init bash --config {{path/to/theme}})"


Initialize for PowerShell:
oh-my-posh init pwsh --config {{path/to/theme}} | Invoke-Expression


Initialize for Zsh:
eval "$(oh-my-posh init zsh --config {{path/to/theme}})"


Enable live reloading:
oh-my-posh enable reload


Disable live reloading:
oh-my-posh disable reload


Print debug information for troubleshooting:
oh-my-posh debug


Update to latest version:
oh-my-posh upgrade

Code Snippets

Display current shell name

oh-my-posh get shell

Initialize for Bash

eval "$(oh-my-posh init bash --config {{path/to/theme}})"

Initialize for PowerShell

oh-my-posh init pwsh --config {{path/to/theme}} | Invoke-Expression

Initialize for Zsh

eval "$(oh-my-posh init zsh --config {{path/to/theme}})"

Enable live reloading

oh-my-posh enable reload

Context

tldr-pages: common/oh-my-posh

Revisions (0)

No revisions yet.