Add prefix to zsh command prompt for any theme

75 Views Asked by At

I want to add a prefix in the command prompt of ZSH regardless of the chosen theme. To be more precise, my current theme is bureau which can cause issues.

I tried several things. For example in the .zshrc:

PROMPT="prefix$PROMPT"

However the prefix shows up just before $ and not at the very beginning ({username} {path} {prefix}> $). My goal is to have: {prefix} {path} {prefix}>$

Here my .zshrc

export ZSH="$HOME/.oh-my-zsh"
export TERM="xterm-256color"

ZSH_THEME="bureau"


plugins=(git gcloud)

source $ZSH/oh-my-zsh.sh


autoload -U +X bashcompinit && bashcompinit
complete -o nospace -C /usr/bin/terraform terraform

PROMPT="prefix$PROMPT" 
0

There are 0 best solutions below