Skip to content

Instantly share code, notes, and snippets.

@0xffan
Last active March 11, 2023 01:44
Show Gist options
  • Save 0xffan/41cbf7f90428822fdd00c3fb39b7cd69 to your computer and use it in GitHub Desktop.
Save 0xffan/41cbf7f90428822fdd00c3fb39b7cd69 to your computer and use it in GitHub Desktop.
# ● ○ ❯❯❯
function prompt_char {
git branch >/dev/null 2>/dev/null && echo '%F{green}±%f' && return
hg root >/dev/null 2>/dev/null && echo '%F{red}λ%f' && return
echo '%F{magenta}»%f'
}
PROMPT='%F{magenta}%n%f at %F{yellow}%m%f in %B%F{green}%~%f%b$(git_prompt_info)
$(virtualenv_prompt_info) $(prompt_char) '
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?"
ZSH_THEME_GIT_PROMPT_CLEAN=""
# plugin: virtualenv
ZSH_THEME_VIRTUALENV_PREFIX="("
ZSH_THEME_VIRTUALENV_SUFFIX=")"
@0xffan
Copy link
Author

0xffan commented Mar 11, 2023

Preview:

preview

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