From a6f4304a120039299e8b4f89a1f547985466dce6 Mon Sep 17 00:00:00 2001 From: Alireza Rafiei Date: Fri, 16 Dec 2016 02:59:08 -0800 Subject: [PATCH] Adding $ or # signs after git indicator The `prompt_char` function is a copy of the same one by @Bregor for Gentoo theme --- themes/kafeitu.zsh-theme | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/themes/kafeitu.zsh-theme b/themes/kafeitu.zsh-theme index c4720b24..c4040777 100644 --- a/themes/kafeitu.zsh-theme +++ b/themes/kafeitu.zsh-theme @@ -1,4 +1,8 @@ -PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%n%{$fg[cyan]%}@%{$fg_bold[green]%}%m %{$fg_bold[green]%}%p %{$fg[cyan]%}%~ %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' +function prompt_char { + if [ $UID -eq 0 ]; then echo "#"; else echo $; fi +} + +PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%n%{$fg[cyan]%}@%{$fg_bold[green]%}%m %{$fg_bold[green]%}%p %{$fg[cyan]%}%~ %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} %_$(prompt_char) % %{$reset_color%}' ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"