feat(bin): starship script to list remote icon

This commit is contained in:
Sergio Laín 2025-06-09 01:04:22 +02:00
parent aac556d735
commit d932529e8c
No known key found for this signature in database
GPG key ID: 51BB28D8B42FB438

13
.local/bin/check-git-remote Executable file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env bash
GIT_REMOTE=$(command git ls-remote --get-url 2>/dev/null)
if [[ "$GIT_REMOTE" =~ "github" ]]; then
GIT_REMOTE_SYMBOL=" "
elif [[ "$GIT_REMOTE" =~ "gitlab" ]]; then
GIT_REMOTE_SYMBOL=" "
elif [[ "$GIT_REMOTE" =~ "bitbucket" ]]; then
GIT_REMOTE_SYMBOL=" "
else
GIT_REMOTE_SYMBOL=" "
fi
echo "$GIT_REMOTE_SYMBOL "