Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions git-prompt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# max_file_list_length=100 # in characters
# count_only=off # off - display file list; on - display file count
# rawhex_len=5 # length of git rawhex revision id display (use 0 to hide it)
# head_separator=' ' # separator between vcs info and dir info
## head_separator='\n' # put vcs info and dir info on separate lines

############################################################ MODULES

Expand Down
7 changes: 4 additions & 3 deletions git-prompt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
virtualenv_module=${virtualenv_module:-on}
error_bell=${error_bell:-off}
cwd_cmd=${cwd_cmd:-\\w}

head_separator=${head_separator:- }

#### dir, rc, root color
cols=`tput colors` # in emacs shell-mode tput colors returns -1
Expand Down Expand Up @@ -624,10 +624,10 @@ parse_vcs_status() {
fi


head_local="$vcs_color(${vcs_info}$vcs_color${file_list}$vcs_color)"
head_local="$vcs_color(${vcs_info}$vcs_color${file_list}$vcs_color)$head_separator"

### fringes
head_local="${head_local+$vcs_color$head_local }"
head_local="${head_local+$vcs_color$head_local}"
#above_local="${head_local+$vcs_color$head_local\n}"
#tail_local="${tail_local+$vcs_color $tail_local}${dir_color}"
}
Expand Down Expand Up @@ -704,6 +704,7 @@ prompt_command_function() {
# if cwd_cmd have back-slash, then assign it value to cwd
# else eval cwd_cmd, cwd should have path after exection
eval "${cwd_cmd/\\/cwd=\\\\}"
eval "${head_separator/\\/head_separator=\\\\}"

PS1="$colors_reset$rc$head_local$color_who_where$dir_color$cwd$tail_local$dir_color$prompt_char $colors_reset"

Expand Down