Steps:
-
Open your Oh My ZSH theme file i.e.
$ nano ~/.oh-my-zsh/themes/maran.zsh-theme
-
Add the following code in the
PROMPT
variable:%{$bg[yellow]%}%{$fg[red]%}YOUR_TEXT_HERE%{$reset_color%}
Example of full
PROMPT
variable:PROMPT='%{$bg[yellow]%}%{$fg[red]%}POC%{$reset_color%} %{$fg[cyan]%}%n%{$reset_color%}@%{$fg[yellow]%}%M:%{$fg[green]%}%/%{$reset_color%}$(git_prompt_info) %(!.#.$) '
-
Save and exit the editor
-
Run
$ source ~/.zshrc
-
Done (you may need to logout and login again if it doesn't work)