OhMyPosh by JanDeDobbeleer is a highly customizable, cross-platform shell prompt renderer that lets you add useful integrations to your shell prompts (Git, GCP, project info, and a lot more).
This repo just contains shell scripts to automate the installation and setup of OhMyPosh for macOS, Windows, and Linux.
Note: These scripts are not written by or officially recommended by OhMyPosh. I wrote them for personal use, and wanted to share them. You are free to use them. Make sure to review the code before you run it on your system.
All scripts use the tokyo.omp.json theme as the default. The theme can be changed later to a theme of your choice (one from the themes that come with OMP or a custom theme) by editing the $OMP_THEME variable.
- curl or wget for unix (macOS / Linux) scripts
The scripts can be accessed using the raw links to the files.
Ensure you are running the scripts in the intended shell.
All scripts for macOS and Linux use Homebrew to install OhMyPosh and will install Homebrew if it is not already installed.
Run the script:
curl:
"$(ps -p $$ -o comm=)" -c "$(curl -fsSL https://raw.githubusercontent.com/rlpvin/setup-ohmyposh/main/unix/setup-omp-unix.sh)"
wget:
"$(ps -p $$ -o comm=)" -c "$(wget -qO- https://raw.githubusercontent.com/rlpvin/setup-ohmyposh/main/unix/setup-omp-unix.sh)"
Run the script:
Invoke-Expression (Invoke-WebRequest -Uri "https://raw.githubusercontent.com/rlpvin/setup-ohmyposh/main/unix/setup-omp-unix-pwsh.ps1").Content
The Windows version of the script uses winget to install OhMyPosh.
Run the script:
Invoke-Expression (Invoke-WebRequest -Uri "https://raw.githubusercontent.com/rlpvin/setup-ohmyposh/main/unix/setup-omp-windows-pwsh.ps1").Content
- If the script runs successfully but the prompt doesn't change, try sourcing the OMP config file created by the script or your shell config file:
source ~/.omp_init
or (example: zsh):
source ~/.zshrc
- If the script is unable to locate your shell config file, add this line manually to it:
source ~/.omp_init
- Windows 11
- macOS Sonoma 14.5 (Apple Silicon)
- Ubuntu (WSL)
It is recommended to use a Nerd Fonts font in your terminal emulator to display additional icons, such as: logos, in some OhMyPosh themes. You can download these here.
You can also install Nerd Fonts using Homebrew:
# List all available Nerd Fonts
brew search nerd-font
# Install a font you like
brew install font-fira-code-nerd-font