fix: include Azure's `VCS_GIT` icon in prompt

There was no case to match an Azure's DevOps git repository. A detection
of an ssh or https remote server connection was included.
This commit is contained in:
Kevin Montoya 2023-10-30 19:51:34 -07:00
parent b24f0b1bc4
commit a68ca173dc
1 changed files with 3 additions and 1 deletions

View File

@ -3724,6 +3724,8 @@ function +vi-vcs-detect-changes() {
vcs_visual_identifier='VCS_GIT_BITBUCKET_ICON'
elif [[ "$remote" =~ "gitlab" ]] then
vcs_visual_identifier='VCS_GIT_GITLAB_ICON'
elif [[ "$remote" =~ "visualstudio" || "$remote" =~ "azure" ]] then
vcs_visual_identifier='VCS_GIT_AZURE_ICON'
else
vcs_visual_identifier='VCS_GIT_ICON'
fi
@ -3867,7 +3869,7 @@ function _p9k_vcs_icon() {
*gitlab*) _p9k__ret=VCS_GIT_GITLAB_ICON;;
# https://learn.microsoft.com/en-us/azure/devops/repos/git/use-ssh-keys-to-authenticate
(|*@)vs-ssh.visualstudio.com(|:*)) _p9k__ret=VCS_GIT_AZURE_ICON;; # old
(|*@)ssh.dev.azure.com(|:*)) _p9k__ret=VCS_GIT_AZURE_ICON;; # new
*azure*) _p9k__ret=VCS_GIT_AZURE_ICON;; # new
*) _p9k__ret=VCS_GIT_ICON;;
esac
}