Skip to content

Instantly share code, notes, and snippets.

@joduplessis
Created May 29, 2024 06:51
Show Gist options
  • Save joduplessis/09eaa5d8a4397dd1c3278ebd5458c804 to your computer and use it in GitHub Desktop.
Save joduplessis/09eaa5d8a4397dd1c3278ebd5458c804 to your computer and use it in GitHub Desktop.
zsh theme for minimal Node dev
function node_prompt_version {
if which node &> /dev/null; then
echo "%{$fg_bold[blue]%}node(%{$FG[129]%}$(node -v)%{$fg[blue]%}) %{$reset_color%}"
fi
}
PROMPT='%{$FG[198]%}%~%{$reset_color%} $(node_prompt_version)$fg[blue]%{$fg[blue]%}(%{$FG[171]%}$(git_current_branch)%{$fg[blue]%}) %{$FG[129]%}➜ '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
@joduplessis
Copy link
Author

screenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment