Last active
December 15, 2018 18:31
-
-
Save jordan-cutler/1eb32d9224bce3dbd5d42da99231c670 to your computer and use it in GitHub Desktop.
Zsh theme
This file contains hidden or 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='$(_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