mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-20 03:13:33 +01:00
Give "robbyrussell" them support for the timed-out check. Uses zsh's `coproc` to put a timeout on the `git status` call inside git_prompt_info() Introduces $ZSH_THEME_GIT_PROMPT_TIMEDOUT and $ZSH_THEME_SCM_CHECK_TIMEOUT theme configuration variables to control how long the timeout is and how the timed-out indicator appears inside the prompt.
8 lines
502 B
Bash
8 lines
502 B
Bash
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)"
|
|
PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$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_TIMEDOUT="%{$fg[blue]%}) %{$fg[red]%}?%{$reset_color%}"
|
|
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
|