diff options
Diffstat (limited to 'prompt_adam3_setup')
-rw-r--r-- | prompt_adam3_setup | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/prompt_adam3_setup b/prompt_adam3_setup index 5f7fa67..54a48d5 100644 --- a/prompt_adam3_setup +++ b/prompt_adam3_setup @@ -58,11 +58,14 @@ prompt_adam3_setup () { } prompt_adam3_precmd () { -# setopt noxtrace localoptions + #setopt noxtrace prompt_subst localoptions zstyle ':vcs_info:*' enable git svn zstyle ':vcs_info:*' check-for-changes true - zstyle ':vcs_info:*' formats "%F{grey}%s %F{green}%b%{$reset_color%} %F{red}%m%u%c%f" - #zstyle ':vcs_info:git*' actionformats "%s %r/%S %b %m%u%c " + zstyle ':vcs_info:*' check-for-staged-changes true + zstyle ':vcs_info:*' stagedstr ' S' + zstyle ':vcs_info:*' unstagedstr ' U' + zstyle ':vcs_info:*' formats "%F{grey}%s %F{green}%b%F{red}%u%c" + zstyle ':vcs_info:git*' actionformats "%F{grey}%s %r/%S %F{green}%b%F{red}%u%c %a" vcs_info local base_prompt_expanded_no_color base_prompt_etc local prompt_length space_left promptchar @@ -74,18 +77,18 @@ prompt_adam3_precmd () { # Changing the prompt based on the length of the prompt, should happen based # on how long it actually is. The method below will need to be changed. if [[ $prompt_length -lt 69 ]]; then - path_prompt="%B%F{$prompt_adam3_color3}%(4~|...|)%3~%F{white}%b" + path_prompt="%B%F{$prompt_adam3_color3}%(4~|...|)%3~%b " else space_left=$(( $COLUMNS - $#base_prompt_expanded_no_color - 2 )) - path_prompt="%B%F{$prompt_adam3_color4}%${space_left}<...<%~$prompt_newline%F{white}%b" + path_prompt="%B%F{$prompt_adam3_color4}%${space_left}<...<%~$prompt_newline%b" fi # make promptchar bold red if root - if [[ $EUID == 0 ]]; then promptchar="%F{red}%B%#%b%f"; else promptchar="%B%#%b"; fi + if [[ $EUID == 0 ]]; then promptchar="%F{red}%B%#%b%f"; else promptchar="%F{white}%B%#%b%f"; fi - PS1="$base_prompt$path_prompt${vcs_info_msg_0_} $promptchar $post_prompt" - PS2="$base_prompt$path_prompt${vcs_info_msg_0_} %_> $post_prompt" - PS3="$base_prompt$path_prompt${vcs_info_msg_0_} ?# $post_prompt" + PS1="$base_prompt$path_prompt${vcs_info_msg_0_}%{$reset_color%} $promptchar $post_prompt" + PS2="$base_prompt$path_prompt${vcs_info_msg_0_}%{$reset_color%} %_> $post_prompt" + PS3="$base_prompt$path_prompt${vcs_info_msg_0_}%{$reset_color%} ?# $post_prompt" } prompt_adam3_setup "$@" |