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
1 change: 1 addition & 0 deletions git-prompt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# 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)
# show_who_where=on # on (default) show user@host; off don't show it

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

Expand Down
4 changes: 3 additions & 1 deletion git-prompt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
unset dir_color rc_color user_id_color root_id_color init_vcs_color clean_vcs_color
unset modified_vcs_color added_vcs_color addmoded_vcs_color untracked_vcs_color op_vcs_color detached_vcs_color hex_vcs_color
unset rawhex_len
unset show_who_where

# work around for conflict with vte.sh
unset VTE_VERSION
Expand Down Expand Up @@ -74,6 +75,7 @@
upcase_hostname=${upcase_hostname:-on}
count_only=${count_only:-off}
rawhex_len=${rawhex_len:-5}
show_who_where=${show_who_where:-on}

aj_max=20

Expand Down Expand Up @@ -332,7 +334,7 @@ set_shell_label() {
#################################################################### WHO_WHERE
# [[user@]host[-tty]]

if [[ -n $id || -n $host ]] ; then
if [[ "$show_who_where" == "on" && ( -n $id || -n $host ) ]] ; then
[[ -n $id && -n $host ]] && at='@' || at=''
color_who_where="${id}${host:+$host_color$at$host}${tty:+ $tty}"
plain_who_where="${id}$at$host"
Expand Down