summaryrefslogtreecommitdiff
path: root/functions/vcs.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'functions/vcs.zsh')
-rw-r--r--functions/vcs.zsh15
1 files changed, 13 insertions, 2 deletions
diff --git a/functions/vcs.zsh b/functions/vcs.zsh
index a0aa2b6c..5defa9bc 100644
--- a/functions/vcs.zsh
+++ b/functions/vcs.zsh
@@ -62,7 +62,7 @@ function +vi-git-remotebranch() {
set_default POWERLEVEL9K_VCS_HIDE_TAGS false
function +vi-git-tagname() {
- if [[ "$POWERLEVE9K_VCS_HIDE_TAGS" == "false" ]]; then
+ if [[ "$POWERLEVEL9K_VCS_HIDE_TAGS" == "false" ]]; then
# If we are on a tag, append the tagname to the current branch string.
local tag
tag=$(git describe --tags --exact-match HEAD 2>/dev/null)
@@ -110,7 +110,18 @@ function +vi-hg-bookmarks() {
function +vi-vcs-detect-changes() {
if [[ "${hook_com[vcs]}" == "git" ]]; then
- vcs_visual_identifier='VCS_GIT_ICON'
+
+ local remote=`git ls-remote --get-url`
+ if [[ "$remote" =~ "github" ]] then
+ vcs_visual_identifier='VCS_GIT_GITHUB_ICON'
+ elif [[ "$remote" =~ "bitbucket" ]] then
+ vcs_visual_identifier='VCS_GIT_BITBUCKET_ICON'
+ elif [[ "$remote" =~ "gitlab" ]] then
+ vcs_visual_identifier='VCS_GIT_GITLAB_ICON'
+ else
+ vcs_visual_identifier='VCS_GIT_ICON'
+ fi
+
elif [[ "${hook_com[vcs]}" == "hg" ]]; then
vcs_visual_identifier='VCS_HG_ICON'
elif [[ "${hook_com[vcs]}" == "svn" ]]; then