-
-
Save giautm/c1ff70fe09549e282ce1f2a5f339dd1e to your computer and use it in GitHub Desktop.
GitHub Codespaces zsh 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
# Codespaces zsh prompt theme | |
__zsh_prompt() { | |
local prompt_username | |
if [ ! -z "${GITHUB_USER}" ]; then | |
prompt_username="@${GITHUB_USER}" | |
else | |
prompt_username="%n" | |
fi | |
PROMPT="%{$fg[green]%}${prompt_username} %(?:%{$reset_color%}➜ :%{$fg_bold[red]%}➜ )" # User/exit code arrow | |
PROMPT+='%{$fg_bold[blue]%}%(5~|%-1~/…/%3~|%4~)%{$reset_color%} ' # cwd | |
PROMPT+='$(git_prompt_info)%{$fg[white]%}$ %{$reset_color%}' # Git status | |
unset -f __zsh_prompt | |
} | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[cyan]%}(%{$fg_bold[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " | |
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg_bold[yellow]%}✗%{$fg_bold[cyan]%})" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[cyan]%})" | |
__zsh_prompt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment