Skip to content

Instantly share code, notes, and snippets.

@jordan-cutler
Last active December 15, 2018 18:31
Show Gist options
  • Save jordan-cutler/1eb32d9224bce3dbd5d42da99231c670 to your computer and use it in GitHub Desktop.
Save jordan-cutler/1eb32d9224bce3dbd5d42da99231c670 to your computer and use it in GitHub Desktop.
Zsh theme
PROMPT='$(_current_dir)$(git_prompt_info) '
# PROMPT='$(_current_dir)$(git_prompt_info) $FG[105]%(!.#.»)%{$reset_color%} '
# uncomment and comment other if you want a little » prompt
function _current_dir() {
local _max_pwd_length="65"
if [[ $(echo -n $PWD | wc -c) -gt ${_max_pwd_length} ]]; then
echo "%{$fg_bold[blue]%}%-2~ ... %3~%{$reset_color%}"
else
echo "%{$fg_bold[blue]%}%~%{$reset_color%}"
fi
}
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}(%{$fg[cyan]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}) %{$fg[yellow]%}⚡"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%})"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment