dotfiles

custom linux config files managed with gnu stow

dotfiles

zsh/.zsh/functions/prompt_git_info


if [ -n "$__CURRENT_GIT_BRANCH" ]; then
    local s="${USER_LEVEL}-[%F{white}"
    s+="$__CURRENT_GIT_BRANCH"
    case "$__CURRENT_GIT_BRANCH_STATUS" in
        ahead)
        s+="↑"
        ;;
        diverged)
        s+="↕"
        ;;
        behind)
        s+="↓"
        ;;
    esac
    if [ -n "$__CURRENT_GIT_BRANCH_IS_DIRTY" ]; then
        s+="⚡"
    fi
    s+="${USER_LEVEL}]"
 
    printf "%s%s" $s
fi

Download

raw zip tar