aboutsummaryrefslogtreecommitdiff
path: root/functions/vcs.zsh
diff options
context:
space:
mode:
authorBen Hilburn <bhilburn@gmail.com>2017-02-14 05:06:54 +0300
committerBen Hilburn <bhilburn@gmail.com>2017-02-14 05:06:54 +0300
commitfa255ba86816b804a54f52230c265fb21b8c6f21 (patch)
treeb5c541547b036e32b4f53989fc5a2d8ecdb732e7 /functions/vcs.zsh
parent3bcc12b547718ce5547321a5bc2e408a32447357 (diff)
parent7e25fa1e93fbb02e2276e1d245748d09c7c63e8a (diff)
Merge branch 'next' of https://github.com/shibumi/powerlevel9k into shibumi-next
Diffstat (limited to 'functions/vcs.zsh')
-rw-r--r--functions/vcs.zsh13
1 files changed, 12 insertions, 1 deletions
diff --git a/functions/vcs.zsh b/functions/vcs.zsh
index 93925f15..5defa9bc 100644
--- a/functions/vcs.zsh
+++ b/functions/vcs.zsh
@@ -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