Skip to content

Instantly share code, notes, and snippets.

@prinsss
Last active November 25, 2021 23:07
Show Gist options
  • Save prinsss/1ae3b8ae3091a6cfd65a22e1872af7ab to your computer and use it in GitHub Desktop.
Save prinsss/1ae3b8ae3091a6cfd65a22e1872af7ab to your computer and use it in GitHub Desktop.
My custom Zsh themes.
# Default bash prompt of CentOS
# e.g. [user@host current]$
PROMPT="%{$fg_bold[green]%}[%n@%m%{$reset_color%} %{$fg_bold[white]%}%c%{$fg_bold[green]%}]%(!.#.$)%{$reset_color%} "
# Default bash prompt of Ubuntu
# e.g. user@host:~/path$
PROMPT="%{$fg_bold[green]%}%n@%m%{$reset_color%}:%{$fg_bold[blue]%}%~%{$reset_color%}%(!.#.$) "
# Default bash prompt of Ubuntu
# e.g. user@host:~/path$
PROMPT="%{$fg_bold[green]%}%n@%m%{$reset_color%}:%{$fg_bold[blue]%}%~%{$reset_color%}%(!.#.$) "
# Use bash-style auto title
ZSH_THEME_TERM_TAB_TITLE_IDLE="%n@%m: %~"
ZSH_THEME_TERM_TITLE_IDLE="%n@%m: %~"
# Modified from robbyrussell, the default theme of oh-my-zsh
# e.g. > current git:(source) x $
PROMPT="%(?:%{$fg_bold[green]%}>:%{$fg_bold[red]%}>)"
PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)%(!.#.$) '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}x"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
@prinsss
Copy link
Author

prinsss commented Jan 15, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment