1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Git prompt stuff from .oh-my-zsh/themes/robbyrussell.zsh-theme
function vcs_prompt_info() {
# Check if we're in a jj repository
if jj show --template "self.description()" >/dev/null 2>&1; then
echo "%{$fg_bold[blue]%}jj:(%{$fg[red]%}$(jj show --template "self.description()")%{$fg_bold[blue]%})%{$reset_color%} "
elif git status >/dev/null 2>&1; then
echo "%{$fg_bold[blue]%}git:(%{$fg[red]%}$(git status -s -b | head -1 | choose 1)%{$fg_bold[blue]%})%{$reset_color%} "
fi
}
PROMPT="%(?:%{$fg_bold[green]%}%1{➜%} :%{$fg_bold[red]%}%1{➜%} ) %{$fg[cyan]%}%c%{$reset_color%} \$(vcs_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]%}%1{✗%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"