Last active
March 18, 2021 17:42
-
-
Save maddiesch/cba3504ca18d96f58a419712d3481de0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function __git_prompt () { | |
if ! git rev-parse --git-dir > /dev/null 2>&1; then | |
return | |
fi | |
echo -n "%{$fg[cyan]%}($(git_current_branch))" | |
echo -n "%{$fg[green]%}[$(git rev-parse HEAD 2> /dev/null | head -c 6)]" | |
echo -n "%{$fg[cyan]%} $(parse_git_dirty)$(git_remote_status)" | |
echo -n "%{$reset_color%}" | |
} | |
function __dev_env () { | |
if [[ "$DEV_ENV" == "local" ]]; then | |
echo -n "%{$FG[134]%}$DEV_ENV %{$reset_color%}" | |
else | |
echo -n "%{$FG[201]%}@$DEV_ENV %{$reset_color%}" | |
fi | |
} | |
ZSH_THEME_GIT_PROMPT_DIRTY="✗" | |
ZSH_THEME_GIT_PROMPT_CLEAN="✔" | |
ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE="" | |
ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE=" 🌩" | |
ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE=" 🌥" | |
PROMPT='%{$fg[yellow]%}[%c]$(__git_prompt)' | |
PROMPT="$(__dev_env)$PROMPT%{$fg_bold[white]%} -> %{$reset_color%}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment