Skip to content

Instantly share code, notes, and snippets.

@hartmut-co-uk
Created November 24, 2021 15:49
Show Gist options
  • Save hartmut-co-uk/4793fef41462889325f1f145f3ea8232 to your computer and use it in GitHub Desktop.
Save hartmut-co-uk/4793fef41462889325f1f145f3ea8232 to your computer and use it in GitHub Desktop.
my custom zsh theme
if [ "$USERNAME" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
PROMPT='%{$fg_bold[cyan]%}[%D{%H:%M:%S}]%{$reset_color%} %{${fg_bold[green]}%}%3~ $(git_prompt_info)%{${fg_bold[$CARETCOLOR]}%}»%{${reset_color}%} '
RPS1="${return_code}"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}‹"
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment