aboutsummaryrefslogtreecommitdiff
path: root/functions/vcs.zsh
diff options
context:
space:
mode:
authorKeith Miyake <keith.miyake@gmail.com>2017-01-22 00:40:51 +0300
committerKeith Miyake <keith.miyake@gmail.com>2017-01-22 00:40:51 +0300
commitf9d2f3a3a5b54b6a6128b2b96d187bd3560a5146 (patch)
tree35bd5be1ea093251e2c292907998cc7e0dedb686 /functions/vcs.zsh
parent82aa37d230cfb48bc6172ce72413077ca78996d0 (diff)
parent9ead1c15480249b082bf93c59540f4a09fa44c8d (diff)
Merge remote-tracking branch 'upstream/next' into nerdfont
* upstream/next: (41 commits) vcs icons: fixing branch spacing and remote icon in fontawesome same deal for the "FAIL_ICON"! fixing the "OK_ICON" in 'awesome-fontconfig' which somehow got broken Change powerlevel9k_init to prompt_powerlevel_setup Fix MacOS specific battery segment logic. Minor fix-up to the README. Adding license note about the new logo. more typos Adding the new logo to the README! fixed typo fixed issue with POWERLEVEL9K_PUBLIC_IP_NONE being empty .. i hope fixed typo reverted testing value to default value added link to segemnt documenation in README fixed issue with POWERLEVEL9K_PUBLIC_IP_NONE being empty for real fixed issue with POWERLEVEL9K_PUBLIC_IP_NONE being empty added README section for public_ip segment added the ability to specify and only attempt a particular method Add Changelog for v0.5.0 added configurable string when there is no IP updated some comments changed some offline behavior ...
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