diff --git a/sm.zsh-theme b/sm.zsh-theme index 7434e9f..6fe2070 100644 --- a/sm.zsh-theme +++ b/sm.zsh-theme @@ -5,6 +5,10 @@ # 2 : username & machine hostname + git prompt # 3 : username & machine hostname + current working directory + git prompt + + + + local RETURN_CODE="%(?..%F{red}%? - )%F{default}"; local ROOT_COLOR="blue"; @@ -18,20 +22,23 @@ local SM_USER="%F{${ROOT_COLOR}}%n%F{yellow}@%F{cyan}%m"; local SM_GIT="$(git_prompt_info) $(git_prompt_status)%F{default}"; local SM_DIR="%F{magenta}%~%F{default}"; local SM_CLOCK="${RETURN_CODE}%F{cyan}%D%F{yellow} / %F{blue}%T%F{default}"; + local SM_FINAL_PROMPT=""; local SM_PROMPT_TEMPLATE=( - "$SM_PREFIX $SM_USER $SM_GIT -" - "$SM_MIDFIX $SM_DIR -" - "$SM_SUFFIX" + '$SM_PREFIX $SM_USER $(git_prompt_info) $(git_prompt_status)%F{default} +' + '$SM_MIDFIX $SM_DIR +' + '$SM_SUFFIX' ) for i in "${SM_PROMPT_TEMPLATE[@]}" ; do SM_FINAL_PROMPT+="$i" ; done ; + PROMPT="$SM_FINAL_PROMPT"; RPROMPT="$SM_CLOCK"; + ZSH_THEME_GIT_PROMPT_PREFIX="%F{magenta}git:%F{default}"; ZSH_THEME_GIT_PROMPT_SUFFIX=""; ZSH_THEME_GIT_PROMPT_DIRTY=" %F{red}✘%F{default}";