Files
dotfiles/.zsh/theme/functions/hg.zsh
2024-10-30 12:37:58 +01:00

11 lines
311 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.
function hg_prompt_info() {
if hg root >/dev/null 2>&1; then
local branch=$(hg branch 2>/dev/null)
if [[ -n "$(hg status 2>/dev/null)" ]]; then
echo "%F{yellow}${branch}%F{red}●%F{yellow}%f"
else
echo "%F{yellow}${branch}%f"
fi
fi
}