Skip to content

Commit cc3df1c

Browse files
committed
Add user information to prompt.
1 parent b185fab commit cc3df1c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

themes/gebner.zsh-theme

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ if [ $UID -eq 0 ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi
55
REPORTTIME=10 # show execution times for long-running commands
66

77
local return_code="%(?..%{$fg[red]%}↵ %? %{$reset_color%})"
8+
local user=
9+
if [ "$USER" != gebner ]; then user='%{$fg[cyan]%}%n%{$fg_bold[blue]%}@%{$reset_color%}'; fi
810

9-
PROMPT='%{${fg[cyan]}%}%m %{${fg_bold[blue]}%}:: %{$reset_color%}%{${fg[green]}%}%3~ $(git_prompt_info)'"${return_code}"'%{${fg_bold[$CARETCOLOR]}%}»%{${reset_color}%} '
11+
PROMPT="${user}"'%{${fg[cyan]}%}%m %{${fg_bold[blue]}%}:: %{$reset_color%}%{${fg[green]}%}%3~ $(git_prompt_info)'"${return_code}"'%{${fg_bold[$CARETCOLOR]}%}»%{${reset_color}%} '
1012

1113
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
1214
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"

0 commit comments

Comments
 (0)