Last active
August 24, 2022 17:23
-
-
Save danielwrobert/050927d2ea063c3ad2e81e50156e3393 to your computer and use it in GitHub Desktop.
My Oh My Zsh prompt theme.
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
# Name in folder (github) | |
# Conditionally indicate if in github repo. Time in 24-hour format is on right. | |
function collapse_pwd { | |
echo $(pwd | sed -e "s,^$HOME,~,") | |
} | |
function prompt_char { | |
echo -n "%{$fg_bold[red]%}➜%{$reset_color%} " | |
} | |
PROMPT=' | |
%{$fg[magenta]%}%n%{$reset_color%} in %{$fg_bold[green]%}$(collapse_pwd)%{$reset_color%}$(git_prompt_info) | |
$(prompt_char) ' | |
RPROMPT='%{$fg_bold[magenta]%}%T%{$reset_color%}' # Comment this out if you don't want the prompt time on the right. | |
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg_bold[blue]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗ %{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[red]%}✔ %{$reset_color%}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment