-
-
Save rizqikazukun/f3ea926930d19c70cadaeceb2b020aa4 to your computer and use it in GitHub Desktop.
oh-my-zsh Default Theme plus Node version info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# oh-my-zsh Theme | |
# Default robbyrussell theme with node version info. | |
# Installation: place this file in .oh-my-zsh/custom/themes/robbyrussell.zsh_theme | |
function node_prompt_version { | |
if which node &> /dev/null; then | |
echo "%{$fg_bold[blue]%}node(%{$fg[red]%}$(node -v)%{$fg[blue]%}) %{$reset_color%}" | |
fi | |
} | |
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )" | |
PROMPT='${ret_status} %{$fg[cyan]%}%c%{$reset_color%} $(node_prompt_version)$(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]%}✗" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment