How to alter the configuration of robbyrussel theme in oh-my-zsh so that the arrow appears after directory?

1.8k Views Asked by At

I have these settings in .oh-my-zsh/themes/robbyrussel file

PROMPT="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"                         
PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'    
1

There are 1 best solutions below

0
On

%c is the trailing component of the current working directory. So, put it after that.

Note, however, that your prompt uses all kinds of stuff that has been deprecated a long time ago. There are much better ways to use colors nowadays in Zsh prompts. You’d do well to read up on prompt expansions.