macOS
Set up your terminal
As the standard terminal only supports 256 colors, we advise using iTerm2 or any other modern day macOS terminal that supports ANSI characters.
To display all icons, we recommend the use of a Nerd Font.
- homebrew
- MacPorts
A Homebrew Formula and Cask (macOS only) are available for easy installation.
brew install jandedobbeleer/oh-my-posh/oh-my-posh
This installs two things:
oh-my-posh
- Executable, added to$(brew --prefix)/bin
themes
- The latest Oh My Posh themes
If you want to use a predefined theme, you can find them in $(brew --prefix oh-my-posh)/themes
, referencing them as such
will always keep them compatible when updating Oh My Posh.
Updating
brew update && brew upgrade oh-my-posh
In case you see strange behaviour in your shell, reload it after upgrading Oh My Posh. For example in zsh:
brew update && brew upgrade && exec zsh
You can install Oh My Posh via MacPorts which is maintained by the community.
sudo port selfupdate
sudo port install oh-my-posh
Oh My Posh will be installed at /opt/local/bin/oh-my-posh
.
Updating
sudo port selfupdate
sudo port upgrade oh-my-posh
More details on the ports page for Oh My Posh.
Next
Now that Oh My Posh is installed, you can go ahead and configure your terminal and shell to get the prompt to look exactly like you want.
- install a font
- configure your terminal/editor to use the installed font
- configure your shell to use Oh My Posh
- (optional) configure a theme or custom prompt configuration