Search code examples
zshprompt

Add Dollar Sign after path in prompt .zsh


I want to add the dollar sign after the path in my prompt.

Current prompt is:

.oh-my-zsh git:(master) 

Wanted prompt is:

.oh-my-zsh git:(master) $

I tried to modify PROMPT in ~/.zshrc without success.


Solution

  • https://github.com/ohmyzsh/ohmyzsh/blob/c78277fd8bda5fec87504469afdf121355876006/themes/gozilla.zsh-theme#L1

    PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}$ % %{$reset_color%}'