mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
add theme codes example for nodeenv-prompt
This commit is contained in:
parent
44968b0b9a
commit
b53b6df558
1 changed files with 24 additions and 1 deletions
|
|
@ -31,5 +31,28 @@ theme.
|
|||
|
||||
Example
|
||||
-------
|
||||
See the following theme codes for example:
|
||||
|
||||
See the [oh-my-zsh::theme::seeker](https://github.com/tonyseek/oh-my-zsh-seeker-theme).
|
||||
function _virtualenv_prompt_info {
|
||||
[[ -n $(whence virtualenv_prompt_info) ]] && virtualenv_prompt_info
|
||||
}
|
||||
|
||||
function _nodeenv_prompt_info {
|
||||
[[ -n $(whence nodeenv_prompt_info) ]] && nodeenv_prompt_info
|
||||
}
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[green]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
function prompt_char {
|
||||
if [ $UID -eq 0 ]; then echo "%{$fg[red]%}#%{$reset_color%}"; else echo $; fi
|
||||
}
|
||||
|
||||
PROMPT='%(?, ,%{$fg[red]%}FAIL%{$reset_color%}
|
||||
)
|
||||
$(_nodeenv_prompt_info)$(_virtualenv_prompt_info)%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}: %{$fg_bold[blue]%}%~%{$reset_color%}$(git_prompt_info)
|
||||
%_ $(prompt_char) '
|
||||
|
||||
RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue