Created
August 23, 2022 10:28
-
-
Save justforuse/cdb0be369baa31164f3656f43426877c to your computer and use it in GitHub Desktop.
A theme for oh my zsh. (extends from robbyrussell)
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
PROMPT="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )" | |
PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info) ⌚ %{$fg_bold[magenta]%}%*%{$reset_color%} | |
%(?:%{$fg_bold[green]%}$ :%{$fg_bold[red]%}$ )' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[yellow]%}git:(%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}) %{$fg[yellow]%}✗" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[yellow]%})" |
Author
justforuse
commented
Aug 23, 2022
- Move the input cursor at a new line
- Add current time
function node_prompt_version {
if which node &> /dev/null; then
echo "%{$fg[green]%}⬢ $(node -v) %{$reset_color%}"
fi
}
PROMPT="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info) ⌚ %{$fg_bold[magenta]%}%*%{$reset_color%}
%(?:%{$fg_bold[green]%}$ :%{$fg_bold[red]%}$ )'
RPROMPT='%{$(echotc UP 1)%}$(node_prompt_version)%{$(echotc DO 1)%}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[yellow]%} %{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN=""
Feature
- Add node version
- Git branch text
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment