ohmyzsh/themes/afc163.zsh-theme
2013-11-15 10:45:56 +08:00

12 lines
577 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

PROMPT='%{$fg_bold[green]%}➼ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c%{$fg_bold[grey]%}$(package_version)%{$fg_bold[grey]%} %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="git:%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%} %{$fg[yellow]%}✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}"
function package_version() {
if [ -f ./package.json ]; then
echo "@"$(grep '"version"' ./package.json | head -n 1 | awk -F'"' '{print $4}')
fi
}