Improve your terminal look and feel with oh my posh

Quick post to show how to set up oh my posh prompt in fish shell

Improve your terminal look and feel with oh my posh
Photo by Rohit Tandon / Unsplash

Oh my posh is "A prompt theme engine for any shell." you could install it and set it up in you fish shell 🐟 here I will show you how.

Install

By following the documentation you could install oh-my-posh via homebrew on manual installation, as I don't use homebrew I will do the manual installation:

curl -s https://ohmyposh.dev/install.sh | bash -s

once done you should add a new entry to your path in fish it is easy to do with fish_add_path

fish_add_path /home/<user>/.local/bin/

don't forget to change <user> section.

Set up

Once you install it you should set up you config.fish to use oh my posh:

oh-my-posh init fish | source

Using a theme

There is a lot of themes you could use a theme, check the complete list here, to set a theme you could do it via config.fish

oh-my-posh init fish --config ~/.cache/oh-my-posh/themes/atomic.omp.json | source

oh-my-posh atomic prompt